mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02: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("rendermode::color");
|
||||||
|
|
||||||
glDebug("context switch");
|
glDebug("context switch");
|
||||||
glfwMakeContextCurrent(vp.window);
|
static bool was_made = false;
|
||||||
|
|
||||||
|
if (m_current_viewport != &vp)
|
||||||
|
{
|
||||||
|
glfwMakeContextCurrent(vp.window);
|
||||||
m_current_viewport = &vp;
|
m_current_viewport = &vp;
|
||||||
|
}
|
||||||
|
|
||||||
if ((!simulation::is_ready) || (Global.gfx_skiprendering))
|
if ((!simulation::is_ready) || (Global.gfx_skiprendering))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user