mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 14:49:19 +02:00
fixes in imgui gl2 interaction with renderers
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user