Remove warning
This commit is contained in:
@@ -103,12 +103,13 @@ void Skybox::draw(glm::mat4 viewMatrix, glm::mat4 projectionMatrix) {
|
|||||||
glDepthMask(GL_FALSE);
|
glDepthMask(GL_FALSE);
|
||||||
shaderProgram->bind();
|
shaderProgram->bind();
|
||||||
|
|
||||||
|
// Delete any translation from the skybox cube
|
||||||
glm::mat4 viewProjectionMatrix = projectionMatrix * glm::mat4(glm::mat3(viewMatrix));
|
glm::mat4 viewProjectionMatrix = projectionMatrix * glm::mat4(glm::mat3(viewMatrix));
|
||||||
|
|
||||||
shaderProgram->setUniform("u_viewProjectionMatrix", viewProjectionMatrix);
|
shaderProgram->setUniform("u_viewProjectionMatrix", viewProjectionMatrix);
|
||||||
|
|
||||||
cubeMap.bind(shaderProgram);
|
cubeMap.bind(shaderProgram);
|
||||||
cubeModel->getMesh(0)->drawWithoutTextures(shaderProgram);
|
cubeModel->getMesh(0)->drawWithoutTextures();
|
||||||
cubeMap.unbind();
|
cubeMap.unbind();
|
||||||
|
|
||||||
shaderProgram->unbind();
|
shaderProgram->unbind();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void Mesh::draw(ShaderProgram *shaderProgram) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mesh::drawWithoutTextures(ShaderProgram *shaderProgram) {
|
void Mesh::drawWithoutTextures() {
|
||||||
|
|
||||||
vertexArray.bind();
|
vertexArray.bind();
|
||||||
glDrawElements(GL_TRIANGLES, numElements, GL_UNSIGNED_INT, 0);
|
glDrawElements(GL_TRIANGLES, numElements, GL_UNSIGNED_INT, 0);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public:
|
|||||||
~Mesh() = default;
|
~Mesh() = default;
|
||||||
|
|
||||||
void draw(ShaderProgram *shaderProgram);
|
void draw(ShaderProgram *shaderProgram);
|
||||||
void drawWithoutTextures(ShaderProgram *shaderProgram);
|
void drawWithoutTextures();
|
||||||
|
|
||||||
VertexArray * getVertexArray() { return &vertexArray; }
|
VertexArray * getVertexArray() { return &vertexArray; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user