diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-11-23 14:34:09 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-11-24 08:54:48 (GMT) |
commit | 004cd14b84e3683cd92cf01061ee9688990f990c (patch) | |
tree | 8f879f07439b212de831c528e832d3c3ab4c6bb3 /src/opengl/qgl.h | |
parent | f309a20b4177572282082b8c17ec9025b75a69b1 (diff) | |
download | Qt-004cd14b84e3683cd92cf01061ee9688990f990c.zip Qt-004cd14b84e3683cd92cf01061ee9688990f990c.tar.gz Qt-004cd14b84e3683cd92cf01061ee9688990f990c.tar.bz2 |
Lighthouse: Fix QGLContext::currentContext for systems with limited
resources. The example plugins EGLFS uses only 1 native
context. Make sure that we only use this 1 context, and that we dont
wrap it in many different QPlatformGLContexts or QGLContexts instanses.
This change also removes the QPlatformWindow link which was made in the
initial QPlatformGLContext change. Lighthouse has to support situations
where a context isnt bound to a QPlatformWindow.
Reviewed-by: gunnar
Diffstat (limited to 'src/opengl/qgl.h')
-rw-r--r-- | src/opengl/qgl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 1f864a3..f5e0bd7 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -383,6 +383,7 @@ public: static const QGLContext* currentContext(); + static QGLContext *fromPlatformGLContext(QPlatformGLContext *platformContext); protected: virtual bool chooseContext(const QGLContext* shareContext = 0); @@ -412,6 +413,10 @@ protected: static QGLContext* currentCtx; private: +#ifdef Q_WS_QPA + QGLContext(QPlatformGLContext *platformContext); +#endif + QScopedPointer<QGLContextPrivate> d_ptr; friend class QGLPixelBuffer; |