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/plugins/platforms/eglfs/qeglfswindowsurface.cpp | |
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/plugins/platforms/eglfs/qeglfswindowsurface.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindowsurface.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindowsurface.cpp b/src/plugins/platforms/eglfs/qeglfswindowsurface.cpp index fcea4d3..ebc04bd 100644 --- a/src/plugins/platforms/eglfs/qeglfswindowsurface.cpp +++ b/src/plugins/platforms/eglfs/qeglfswindowsurface.cpp @@ -57,13 +57,10 @@ public: #ifdef QEGL_EXTRA_DEBUG qWarning("QEglPaintDevice %p, %p, %p",this, screen, widget); #endif - QGLFormat format; - m_context = new QGLContext(format, widget); - m_context->create(); } QSize size() const { return m_screen->geometry().size(); } - QGLContext* context() const { return m_context;} + QGLContext* context() const { return QGLContext::fromPlatformGLContext(m_screen->platformContext());} QPaintEngine *paintEngine() const { return qt_qgl_paint_engine(); } |