enable depth test when rendering the layers, reduce pan camera speed
This commit is contained in:
@@ -2043,6 +2043,8 @@ public:
|
||||
auto blend = glIsEnabled(GL_BLEND);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
for (int plane_index = 0; plane_index < 6; plane_index++)
|
||||
{
|
||||
auto plane_mvp = proj * camera * glm::scale(glm::vec3(m_canvas->m_order.size())) * m_canvas->m_plane_transform[plane_index] * glm::translate(glm::vec3(0, 0, -1));
|
||||
@@ -2076,6 +2078,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
for (auto& mode : *m_canvas->m_mode)
|
||||
mode->on_Draw(ortho_proj, proj, camera);
|
||||
|
||||
Reference in New Issue
Block a user