diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-04-28 09:57:29 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-04-28 17:26:34 +0200 |
commit | 039c9efa6d007f5512895c0be742e7926c4ac7b2 (patch) | |
tree | e2fba744738a61e31a32dea8b3533e0d6b7e2146 /vcl | |
parent | d87b312bcc8a5e64d9a5d0ea647a1050629421bd (diff) |
Introduce OpenGLContext::MakeCurrent for switching between contexts
Change-Id: I00b06d1330241c4df3b07dc6e0019c49fd7aa521
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 07b38d2d60bd..5d1d4a0da7fd 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -726,6 +726,17 @@ SystemWindowData OpenGLContext::generateWinData(Window* pParent) #endif +void OpenGLContext::makeCurrent() +{ +#if defined( WNT ) + wglMakeCurrent(m_aGLWin.hDC,m_aGLWin.hRC); +#elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) + // nothing +#elif defined( UNX ) + glXMakeCurrent( m_aGLWin.dpy, m_aGLWin.win, m_aGLWin.ctx ); +#endif +} + void OpenGLContext::swapBuffers() { #if defined( WNT ) |