fix depth buffer creation

This commit is contained in:
2019-05-20 12:12:44 +02:00
parent 0e22e9918a
commit 63b38eff92
6 changed files with 18 additions and 6 deletions

View File

@@ -218,6 +218,7 @@ void NodePanelGrid::draw_heightmap(const glm::mat4& proj, const glm::mat4& camer
{
if (m_groud_opacity->get_value() > 0.f)
{
bool depth = glIsEnabled(GL_DEPTH_TEST);
glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT);
@@ -313,6 +314,7 @@ void NodePanelGrid::draw_heightmap(const glm::mat4& proj, const glm::mat4& camer
m_plane.draw_fill();
}
}
depth ? glEnable(GL_DEPTH_TEST) : glDisable(GL_DEPTH_TEST);
}
}