summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-12-02 06:54:27 +0000
committerJan Holesovsky <kendy@collabora.com>2014-12-02 11:58:47 +0100
commitaefeef36fdd536bfc8b1038e14d552db8c60c70d (patch)
tree5455ae4ee3a104504859083c75a5f92950fefb40 /vcl/source/opengl
parent44b6f1cbdc821765ef4f889f0e6a558b44100407 (diff)
vcl: use resetToReInitialize to avoid context problems on Windows.
It appears that we have to do this for VirtualDevices, where we have freed / re-allocated the underlying resource, or we fail to switch the current context, and render to the wrong place, before blatting a blank texture over the top of it. Change-Id: I0253f216ea7dc9786374dc83ca38f4f6295e3035
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 95b39401fb2c..41eae3ba61b0 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -621,6 +621,17 @@ bool OpenGLContext::init(SystemChildWindow* pChildWindow)
return ImplInit();
}
+#if defined( WNT )
+// FIXME share resetToReInitialize() across platforms...
+void OpenGLContext::resetToReInitialize()
+{
+ if( !mbInitialized )
+ return;
+ resetCurrent();
+ mbInitialized = false;
+}
+#endif
+
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
bool OpenGLContext::init(Display* dpy, Window win, int screen)
{