16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 13:39:18 +02:00

fixes in imgui gl2 interaction with renderers

This commit is contained in:
milek7
2021-01-22 02:36:49 +01:00
parent 8ec29babf9
commit 839b2116df
4 changed files with 21 additions and 3 deletions

View File

@@ -670,8 +670,13 @@ void opengl33_renderer::Render_pass(viewport_config &vp, rendermode const Mode)
gl::framebuffer::unbind();
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if (vp.main)
if (vp.main) {
// clear state for ui
gl::vao::unbind();
gl::buffer::unbind();
gl::program::unbind();
Application.render_ui();
}
break;
}
@@ -938,6 +943,10 @@ void opengl33_renderer::Render_pass(viewport_config &vp, rendermode const Mode)
Timer::subsystem.gfx_gui.start();
if (vp.main) {
// clear state for ui
gl::vao::unbind();
gl::buffer::unbind();
gl::program::unbind();
draw_debug_ui();
Application.render_ui();
}