mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Fix bug: glDisable(GL_DEPTH) -> glDisable(GL_DEPTH_TEST)
This commit is contained in:
@@ -273,7 +273,7 @@ int main(int argc, char* argv[])
|
||||
// -----
|
||||
|
||||
// set render states
|
||||
glDisable(GL_DEPTH);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDepthMask(GL_TRUE); // enable depth writes so glClear won't ignore clearing the depth buffer
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
@@ -379,4 +379,4 @@ glm::mat4 calculate_model_matrix(const glm::vec3& position, const glm::vec3& rot
|
||||
trans = glm::scale(trans, scale);
|
||||
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user