diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-07-13 07:52:51 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-07-13 07:54:09 +0200 |
commit | dde00f1f8ac598314b7f8a787eeacc841bc65f1c (patch) | |
tree | c8d6bb18995fd63fd4f30dc03133ede42ee8ac87 /vcl | |
parent | 47a82452b5040cd712ffafb7d153fd18940ee1af (diff) |
make threaded rendering work correctly, fdo#81110
The context may only be bound in one thread!
Change-Id: Ibb67f88c2f11fd48884ee39d89620193e4e5471b
Diffstat (limited to 'vcl')
-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 48eb267aa404..dedd5b4953ae 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -800,6 +800,17 @@ void OpenGLContext::makeCurrent() #endif } +void OpenGLContext::resetCurrent() +{ +#if defined( WNT ) + wglMakeCurrent( m_aGLWin.hDC, 0 ); +#elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) + // nothing +#elif defined( UNX ) + glXMakeCurrent(m_aGLWin.dpy, None, NULL); +#endif +} + void OpenGLContext::swapBuffers() { #if defined( WNT ) |