16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-23 09:49:19 +02:00

fix camera-lights lag

This commit is contained in:
milek7
2018-10-18 22:34:58 +02:00
parent 6cf93f5a6d
commit 1761f0b367

View File

@@ -404,7 +404,6 @@ void opengl_renderer::Render_pass(rendermode const Mode)
break; break;
} }
Update_Lights(simulation::Lights);
scene_ubs.time = Timer::GetTime(); scene_ubs.time = Timer::GetTime();
scene_ubs.projection = OpenGLMatrices.data(GL_PROJECTION); scene_ubs.projection = OpenGLMatrices.data(GL_PROJECTION);
scene_ubo->update(scene_ubs); scene_ubo->update(scene_ubs);
@@ -1576,6 +1575,8 @@ void opengl_renderer::Render(scene::basic_region *Region)
{ {
case rendermode::color: case rendermode::color:
{ {
Update_Lights(simulation::Lights);
Render(std::begin(m_sectionqueue), std::end(m_sectionqueue)); Render(std::begin(m_sectionqueue), std::end(m_sectionqueue));
// draw queue is filled while rendering sections // draw queue is filled while rendering sections
if (EditorModeFlag) if (EditorModeFlag)