summaryrefslogtreecommitdiff
path: root/vcl/source/opengl/OpenGLContext.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-04-29 17:07:11 +0900
committerTomaž Vajngerl <quikee@gmail.com>2016-04-30 03:08:08 +0000
commita57d048f88ba6cac3ce1550e2a8a143a8887eb05 (patch)
tree9539c3447fc838c098cd78cb86d9c9473aacf9b1 /vcl/source/opengl/OpenGLContext.cxx
parentb8f0e6452cc019744c44997c92831d94086b35b7 (diff)
opengl: sync scissor and stencil state, generic capability state
Scissor and stencil test needed to be disabled in flush() (which means every postDraw call) because sometimes the state became out of sync with the current state. This commit adds sync() function which synchronises the actual OpenGL state and adds debugging mechanisms to warn when the state becomes out of sync (so we can inspect the exact moment in apitrace). Added a GenericCapabilityState for GL capabilities like GL_SCISSORS_TEST, GL_STENCIL_TEST, GL_BLEND,... and refactored existing ScissorState and StencilState to inherit from it. Change-Id: Ifc159108a5ce850c78a89b1f5b8d12ecdd84f459 Reviewed-on: https://gerrit.libreoffice.org/24506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/opengl/OpenGLContext.cxx')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index b5881fe18c90..5b441db4eaef 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1226,6 +1226,7 @@ void OpenGLContext::reset()
// reset the clip region
maClipRegion.SetEmpty();
+ mpRenderState.reset(new RenderState);
// destroy all framebuffers
if( mpLastFramebuffer )