mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Do not make context current if not needed
This commit is contained in:
@@ -657,9 +657,13 @@ void opengl33_renderer::Render_pass(viewport_config &vp, rendermode const Mode)
|
||||
glDebug("rendermode::color");
|
||||
|
||||
glDebug("context switch");
|
||||
glfwMakeContextCurrent(vp.window);
|
||||
static bool was_made = false;
|
||||
|
||||
m_current_viewport = &vp;
|
||||
if (m_current_viewport != &vp)
|
||||
{
|
||||
glfwMakeContextCurrent(vp.window);
|
||||
m_current_viewport = &vp;
|
||||
}
|
||||
|
||||
if ((!simulation::is_ready) || (Global.gfx_skiprendering))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user