diff options
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index b8e6e3112aa1..91573eb5c3c0 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -784,6 +784,8 @@ bool OpenGLContext::ImplInit() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + registerAsCurrent(); + return bRet; } @@ -925,6 +927,8 @@ bool OpenGLContext::ImplInit() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + registerAsCurrent(); + return true; } @@ -1347,8 +1351,6 @@ void OpenGLContext::prepareForYield() void OpenGLContext::makeCurrent() { - ImplSVData* pSVData = ImplGetSVData(); - if (isCurrent()) return; @@ -1383,6 +1385,13 @@ void OpenGLContext::makeCurrent() } #endif + registerAsCurrent(); +} + +void OpenGLContext::registerAsCurrent() +{ + ImplSVData* pSVData = ImplGetSVData(); + // move the context to the end of the contexts list static int nSwitch = 0; VCL_GL_INFO("vcl.opengl", "******* CONTEXT SWITCH " << ++nSwitch << " *********"); |