summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorToma┼ż Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-11-27 22:51:39 +0100
committerDavid Tardon <dtardon@redhat.com>2016-11-29 14:28:10 +0000
commit58a6cbfbf309b151b9d1463c734343430f9a1220 (patch)
tree67dc26e1ab74389d7fe48b7dd484846b4dabc331 /vcl/source/opengl
parent5bf32e4e78ffbe34f3b2840a9677ded34e5b4da7 (diff)
tdf#104139 state can't be set as context may not be available
When RenderState is constructed (and all capability states get constructed) the OpenGL context may not be available yet, so we just set the state to whatever value (false) and make sure we sync with the actual state right away when we have OpenGL context set up and ready. Change-Id: I65a669ab76c1834775007d62efe3d6ac061d6f21 Reviewed-on: https://gerrit.libreoffice.org/31278 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index f681dc21a4ec..93bde70bcdf7 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -568,6 +568,9 @@ void OpenGLContext::registerAsCurrent()
pSVData->maGDIData.mpLastContext->mpNextContext = this;
pSVData->maGDIData.mpLastContext = this;
}
+
+ // sync the render state with the current context
+ mpRenderState->sync();
}
void OpenGLContext::resetCurrent()