From 22c4e4d240133e45230c7ef5c4dbb209fb75e4f8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 May 2016 16:39:58 +0200 Subject: [PATCH] Set OpenGL context only when the parent window is visible. --- common/gal/opengl/opengl_gal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c498535eb8..c3ee4ac881 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -302,7 +302,9 @@ void OPENGL_GAL::EndDrawing() void OPENGL_GAL::BeginUpdate() { - SetCurrent( *OPENGL_GAL::glContext ); + if( IsShownOnScreen() ) + SetCurrent( *OPENGL_GAL::glContext ); + cachedManager.Map(); }