summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-05-19 19:21:29 +0200
committerDavid Tardon <dtardon@redhat.com>2014-05-20 15:48:51 +0200
commiteccaf91ec9c50d42ce98c90abe2c129bedbbc60e (patch)
tree7dc2e35978932474bfe6e59e1d5eada2eeb04900 /vcl
parent92621df9e72b9d4e44e448f92df14c4ba731d5e4 (diff)
use VCL's OpenGLContext for 3D transitions
Change-Id: I510518461eb8bc9669d0de2679c34c473f66b175
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 0ce85cb7f4cd..9370aaedf92b 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -551,6 +551,17 @@ bool OpenGLContext::ImplInit()
return true;
}
+void OpenGLContext::setWinPosAndSize(const Point &rPos, const Size& rSize)
+{
+ if(m_pWindow)
+ m_pWindow->SetPosSizePixel(rPos, rSize);
+ if( m_pChildWindow )
+ m_pChildWindow->SetPosSizePixel(rPos, rSize);
+
+ m_aGLWin.Width = rSize.Width();
+ m_aGLWin.Height = rSize.Height();
+}
+
void OpenGLContext::setWinSize(const Size& rSize)
{
if(m_pWindow)
@@ -795,4 +806,24 @@ void OpenGLContext::swapBuffers()
#endif
}
+void OpenGLContext::sync()
+{
+#if defined( WNT )
+ // nothing
+#elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID )
+ // nothing
+#elif defined( UNX )
+ glXWaitGL();
+ XSync(m_aGLWin.dpy, false);
+#endif
+}
+
+void OpenGLContext::show()
+{
+ if (m_pChildWindow)
+ m_pChildWindow->Show();
+ else if (m_pWindow)
+ m_pWindow->Show();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */