diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-08 06:35:49 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-08 06:35:49 (GMT) |
commit | a914500cbccc4569d7f681eaa0f9453413fc988c (patch) | |
tree | fe777a5f8867a5dd515f9fc4ba7774c54a017b02 /src/opengl | |
parent | fcec5d444f1e37e7b53ab503fa46b4d7f7d90b41 (diff) | |
download | Qt-a914500cbccc4569d7f681eaa0f9453413fc988c.zip Qt-a914500cbccc4569d7f681eaa0f9453413fc988c.tar.gz Qt-a914500cbccc4569d7f681eaa0f9453413fc988c.tar.bz2 |
Fixup QPlatformGLContext
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl_lite.cpp | 15 | ||||
-rw-r--r-- | src/opengl/qplatformglcontext_lite.h | 4 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/opengl/qgl_lite.cpp b/src/opengl/qgl_lite.cpp index a1d9bb8..db1077d 100644 --- a/src/opengl/qgl_lite.cpp +++ b/src/opengl/qgl_lite.cpp @@ -52,6 +52,15 @@ QT_BEGIN_NAMESPACE +QPlatformGLContext::QPlatformGLContext() +{ +} + +QPlatformGLContext::~QPlatformGLContext() +{ +} + + bool QGLFormat::hasOpenGL() { return QApplicationPrivate::platformIntegration()->hasOpenGL(); @@ -61,9 +70,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) { Q_D(QGLContext); d->platformContext = QApplicationPrivate::platformIntegration()->createGLContext(); - d->platformContext->create(d->paintDevice, d->glFormat, shareContext ? shareContext->d_func()->platformContext : 0); + d->valid = d->platformContext->create(d->paintDevice, d->glFormat, shareContext ? shareContext->d_func()->platformContext : 0); - return false; + return d->valid; } void QGLContext::reset() @@ -91,12 +100,14 @@ void QGLContext::makeCurrent() { Q_D(QGLContext); d->platformContext->makeCurrent(); + QGLContextPrivate::setCurrentContext(this); } void QGLContext::doneCurrent() { Q_D(QGLContext); d->platformContext->doneCurrent(); + QGLContextPrivate::setCurrentContext(0); } void QGLContext::swapBuffers() const diff --git a/src/opengl/qplatformglcontext_lite.h b/src/opengl/qplatformglcontext_lite.h index 19a2074..10c05f6 100644 --- a/src/opengl/qplatformglcontext_lite.h +++ b/src/opengl/qplatformglcontext_lite.h @@ -42,11 +42,13 @@ #ifndef QPLATFORM_GL_CONTEXT_H #define QPLATFORM_GL_CONTEXT_H +#include <QtOpenGL/qgl.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QPlatformGLContext +class Q_OPENGL_EXPORT QPlatformGLContext { public: QPlatformGLContext(); |