diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-11-18 12:03:59 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-11-22 13:14:08 (GMT) |
commit | 292f6a9ba1b5da049e4898525974c6f0575ccd65 (patch) | |
tree | b44bdf07f56298d7206a180a41690c2de3371fc6 /src/plugins/platforms/eglconvenience | |
parent | a1acef227647b3043998f9ccf364ead5c29b882d (diff) | |
download | Qt-292f6a9ba1b5da049e4898525974c6f0575ccd65.zip Qt-292f6a9ba1b5da049e4898525974c6f0575ccd65.tar.gz Qt-292f6a9ba1b5da049e4898525974c6f0575ccd65.tar.bz2 |
Lighthouse: move the currentContext functionality to QPlatformGLContext
This means the threading functionality has been delegated down to
QPlatformGLContext. However, it is still possible to use
QGLContext::currentContext to retrieve the QGLContext. This so that
QGLFunctions, QGLShaderProgram etc can be used without a QGLWidget.
Reviewed-by: paul
Diffstat (limited to 'src/plugins/platforms/eglconvenience')
-rw-r--r-- | src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/eglconvenience/qeglplatformcontext.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp b/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp index ae3b539..a169c35 100644 --- a/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp +++ b/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp @@ -48,8 +48,8 @@ #include <EGL/egl.h> -QEGLPlatformContext::QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi) - : QPlatformGLContext() +QEGLPlatformContext::QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi, QPlatformWindow *platformWindow) + : QPlatformGLContext(platformWindow) , m_eglDisplay(display) , m_eglSurface(surface) , m_eglApi(eglApi) @@ -88,6 +88,7 @@ QEGLPlatformContext::~QEGLPlatformContext() void QEGLPlatformContext::makeCurrent() { + QPlatformGLContext::makeCurrent(); #ifdef QEGL_EXTRA_DEBUG qWarning("QEglContext::makeCurrent: %p\n",this); #endif @@ -117,6 +118,7 @@ void QEGLPlatformContext::makeCurrent() } void QEGLPlatformContext::doneCurrent() { + QPlatformGLContext::doneCurrent(); #ifdef QEGL_EXTRA_DEBUG qWarning("QEglContext::doneCurrent:%p\n",this); #endif diff --git a/src/plugins/platforms/eglconvenience/qeglplatformcontext.h b/src/plugins/platforms/eglconvenience/qeglplatformcontext.h index ae1a891..2c38aca 100644 --- a/src/plugins/platforms/eglconvenience/qeglplatformcontext.h +++ b/src/plugins/platforms/eglconvenience/qeglplatformcontext.h @@ -48,7 +48,7 @@ class QEGLPlatformContext : public QPlatformGLContext { public: - QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi); + QEGLPlatformContext(EGLDisplay display, EGLConfig config, EGLint contextAttrs[], EGLSurface surface, EGLenum eglApi, QPlatformWindow *platformWindow); ~QEGLPlatformContext(); void makeCurrent(); |