diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-03-01 13:12:23 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-03-02 08:24:26 (GMT) |
commit | b2cbb880273ae6516d68be5b5f3f9b614c31ca79 (patch) | |
tree | 9d151f0821186a7ee6855911992d712cac21397d /src/opengl/qwindowsurface_gl.cpp | |
parent | f936cc4e2a7b377981a626b1d45dbbb1c1df1cb8 (diff) | |
download | Qt-b2cbb880273ae6516d68be5b5f3f9b614c31ca79.zip Qt-b2cbb880273ae6516d68be5b5f3f9b614c31ca79.tar.gz Qt-b2cbb880273ae6516d68be5b5f3f9b614c31ca79.tar.bz2 |
Move QGLWidget::setContext logic into QEgl & QGLContext
QEgl::createSurface() on X11 will now check to see if the device's
X11 Visual is compatible with the EGLConfig passed in. If it is not
compatible, the function will re-create the QPaintDevice's native
drawable with a different Visual (one which is compatable with the
EGLConfig). This represented the bulk of the QGLWidget::setContext
method which is now much simpler.
As a consequense of this change, QWidgets with graphicssystem opengl
will behave much more like QGLWidget as most of the code is re-used.
So things like WA_TranslucentBackground should now work with opengl
graphicssystem too.
Reviewed-By: TrustMe
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 0334cbc..ca88de3 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -353,18 +353,6 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) QGLContext *ctx = new QGLContext(surfaceFormat, widget); ctx->create(qt_gl_share_widget()->context()); -#if defined(Q_WS_X11) && defined(QT_OPENGL_ES) - // Create the EGL surface to draw into. QGLContext::chooseContext() - // does not do this for X11/EGL, but does do it for other platforms. - // This probably belongs in qgl_x11egl.cpp. - QGLContextPrivate *ctxpriv = ctx->d_func(); - ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(widget); - if (ctxpriv->eglSurface == EGL_NO_SURFACE) { - qWarning() << "hijackWindow() could not create EGL surface"; - } - qDebug("QGLWindowSurface - using EGLConfig %d", reinterpret_cast<int>(ctxpriv->eglContext->config())); -#endif - widgetPrivate->extraData()->glContext = ctx; union { QGLContext **ctxPtr; void **voidPtr; }; |