diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-12-02 06:54:27 +0000 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-02 11:58:47 +0100 |
commit | aefeef36fdd536bfc8b1038e14d552db8c60c70d (patch) | |
tree | 5455ae4ee3a104504859083c75a5f92950fefb40 /vcl/source/opengl | |
parent | 44b6f1cbdc821765ef4f889f0e6a558b44100407 (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.cxx | 11 |
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) { |