summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_wince.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-09-24 23:42:43 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-09-24 23:42:43 (GMT)
commit7421f79f57f475b9e96e53e5cbd9861c428d4ae3 (patch)
tree0fa825c9c29be98c9ba02c191fe3a2001702416e /src/opengl/qgl_wince.cpp
parentf6dee67827e72a0660f37998dafb18c6ccd9834e (diff)
downloadQt-7421f79f57f475b9e96e53e5cbd9861c428d4ae3.zip
Qt-7421f79f57f475b9e96e53e5cbd9861c428d4ae3.tar.gz
Qt-7421f79f57f475b9e96e53e5cbd9861c428d4ae3.tar.bz2
Start to separate the EGLSurface from QEglContext in QtOpenGL
Also, move the EGL makeCurrent(), doneCurrent(), swapBuffers(), and reset() functions into the common qgl_egl.cpp. Reviewed-by: Sarah Smith
Diffstat (limited to 'src/opengl/qgl_wince.cpp')
-rw-r--r--src/opengl/qgl_wince.cpp61
1 files changed, 1 insertions, 60 deletions
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp
index 4e655f1..f951ea0 100644
--- a/src/opengl/qgl_wince.cpp
+++ b/src/opengl/qgl_wince.cpp
@@ -183,6 +183,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
d->eglContext = 0;
return false;
}
+ d->eglSurface = d->eglContext->surface();
return true;
@@ -415,66 +416,6 @@ const QRgb* QGLCmap::colors() const
}
-void QGLContext::reset()
-{
- Q_D(QGLContext);
- if (!d->valid)
- return;
- d->cleanup();
- doneCurrent();
- if (d->eglContext) {
- delete d->eglContext;
- d->eglContext = 0;
- }
- d->crWin = false;
- d->sharing = false;
- d->valid = false;
- d->transpColor = QColor();
- d->initDone = false;
- qgl_share_reg()->removeShare(this);
-}
-
-
-//
-// NOTE: In a multi-threaded environment, each thread has a current
-// context. If we want to make this code thread-safe, we probably
-// have to use TLS (thread local storage) for keeping current contexts.
-//
-
-void QGLContext::makeCurrent()
-{
-
- Q_D(QGLContext);
- if(!d->valid || !d->eglContext) {
- qWarning("QGLContext::makeCurrent(): Cannot make invalid context current");
- return;
- }
-
- if (d->eglContext->makeCurrent())
- QGLContextPrivate::setCurrentContext(this);
-}
-
-
-void QGLContext::doneCurrent()
-{
-
- Q_D(QGLContext);
- if (d->eglContext)
- d->eglContext->doneCurrent();
-
- QGLContextPrivate::setCurrentContext(0);
-}
-
-void QGLContext::swapBuffers() const
-{
- Q_D(const QGLContext);
- if(!d->valid || !d->eglContext)
- return;
-
- d->eglContext->swapBuffers();
-}
-
-
QColor QGLContext::overlayTransparentColor() const
{
return d_func()->transpColor;