diff --git a/src/Controller.cpp b/src/Controller.cpp index f29205e..a58e76c 100644 --- a/src/Controller.cpp +++ b/src/Controller.cpp @@ -155,11 +155,16 @@ void Controller::run() { glBindTexture(GL_TEXTURE_2D, pp_framebuffer->getTextureId()); GLint location = glGetUniformLocation(postProcessingProgram.getShaderProgramId(), "u_texture"); glUniform1i(location, 0); + // Disable wireframe mode + GLint wireframe; + glGetIntegerv(GL_POLYGON_MODE, &wireframe); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); GLuint temp_vao; glGenVertexArrays(1, &temp_vao); glBindVertexArray(temp_vao); glDrawArrays(GL_TRIANGLES, 0, 3); glBindVertexArray(0); + glPolygonMode(GL_FRONT_AND_BACK, wireframe); postProcessingProgram.unbind(); #ifdef _DEBUG diff --git a/src/Entity.cpp b/src/Entity.cpp index 4a8806c..b98edf6 100644 --- a/src/Entity.cpp +++ b/src/Entity.cpp @@ -108,7 +108,7 @@ void Skybox::draw(glm::mat4 viewMatrix, glm::mat4 projectionMatrix) { shaderProgram->setUniform("u_viewProjectionMatrix", viewProjectionMatrix); cubeMap.bind(shaderProgram); - cubeModel->getMesh(0)->drawWithoutTextures(shaderProgram); + cubeModel->getMesh(0)->drawWithoutTextures(); cubeMap.unbind(); shaderProgram->unbind(); diff --git a/src/Mesh.cpp b/src/Mesh.cpp index a98104e..051c65d 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -36,7 +36,7 @@ void Mesh::draw(ShaderProgram *shaderProgram) { } -void Mesh::drawWithoutTextures(ShaderProgram *shaderProgram) { +void Mesh::drawWithoutTextures() { vertexArray.bind(); glDrawElements(GL_TRIANGLES, numElements, GL_UNSIGNED_INT, 0); diff --git a/src/Mesh.h b/src/Mesh.h index 321a2e8..7fdcfd5 100644 --- a/src/Mesh.h +++ b/src/Mesh.h @@ -15,7 +15,7 @@ public: ~Mesh() = default; void draw(ShaderProgram *shaderProgram); - void drawWithoutTextures(ShaderProgram *shaderProgram); + void drawWithoutTextures(); VertexArray * getVertexArray() { return &vertexArray; }