draw on depth buffer for heightmap to remove hidden lines

This commit is contained in:
2018-08-08 22:41:46 +02:00
parent 25ff880b76
commit ba81f97e99

View File

@@ -278,6 +278,9 @@ void NodeCanvas::draw()
if (App::I.grid->m_groud_opacity->get_value() > 0.f)
{
glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT);
// DRAW GRIDS
ui::ShaderManager::use(kShader::Color);
@@ -299,6 +302,9 @@ void NodeCanvas::draw()
* glm::scale(glm::vec3(grid_scale, grid_scale, 1))
);
//m_grid.draw_stroke();
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
App::I.grid->m_hm_plane.draw_fill();
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
App::I.grid->m_hm_plane.draw_stroke();
}