src/opengl/qglpixelbuffer_egl.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
--- a/src/opengl/qglpixelbuffer_egl.cpp	Mon Jun 21 22:38:13 2010 +0100
+++ b/src/opengl/qglpixelbuffer_egl.cpp	Thu Jul 22 16:41:55 2010 +0100
@@ -47,10 +47,6 @@
 #include <qimage.h>
 #include <private/qgl_p.h>
 
-#ifdef QT_OPENGL_ES_1_CL
-#include "qgl_cl_p.h"
-#endif
-
 QT_BEGIN_NAMESPACE
 
 #ifdef EGL_BIND_TO_TEXTURE_RGBA
@@ -79,14 +75,15 @@
         ctx->setConfig(shareContext->config());
 #if QGL_RENDER_TEXTURE
         EGLint value = EGL_FALSE;
-        if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGBA, &value) && value)
+        if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGBA) == EGL_TRUE)
             textureFormat = EGL_TEXTURE_RGBA;
-        else if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGB, &value) && value)
+        else if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGB) == EGL_TRUE)
             textureFormat = EGL_TEXTURE_RGB;
 #endif
     } else {
         QEglProperties configProps;
-        qt_egl_set_format(configProps, QInternal::Pbuffer, f);
+        qt_eglproperties_set_glformat(configProps, f);
+        configProps.setDeviceType(QInternal::Pbuffer);
         configProps.setRenderableType(ctx->api());
         bool ok = false;
 #if QGL_RENDER_TEXTURE
@@ -116,7 +113,7 @@
     }
 
     // Retrieve the actual format properties.
-    qt_egl_update_format(*ctx, format);
+    qt_glformat_from_eglconfig(format, ctx->config());
 
     // Create the attributes needed for the pbuffer.
     QEglProperties attribs;
@@ -141,7 +138,7 @@
     }
 #endif
     if (pbuf == EGL_NO_SURFACE) {
-        qWarning() << "QGLPixelBufferPrivate::init(): Unable to create EGL pbuffer surface:" << QEglContext::errorString(eglGetError());
+        qWarning() << "QGLPixelBufferPrivate::init(): Unable to create EGL pbuffer surface:" << QEgl::errorString();
         return false;
     }
 
@@ -208,11 +205,12 @@
 bool QGLPixelBuffer::hasOpenGLPbuffers()
 {
     // See if we have at least 1 configuration that matches the default format.
-    EGLDisplay dpy = QEglContext::display();
+    EGLDisplay dpy = QEgl::display();
     if (dpy == EGL_NO_DISPLAY)
         return false;
     QEglProperties configProps;
-    qt_egl_set_format(configProps, QInternal::Pbuffer, QGLFormat::defaultFormat());
+    qt_eglproperties_set_glformat(configProps, QGLFormat::defaultFormat());
+    configProps.setDeviceType(QInternal::Pbuffer);
     configProps.setRenderableType(QEgl::OpenGL);
     do {
         EGLConfig cfg = 0;