summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-09 03:19:36 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-09 03:20:01 (GMT)
commit73d9dced8298dfad7bc72607146e81e96fffb6d4 (patch)
tree41c2253175851547e5da64f4d530e18c10913d0b /src/opengl
parent8ee6d090d45198fb2530849236c97f014666b7e4 (diff)
downloadQt-73d9dced8298dfad7bc72607146e81e96fffb6d4.zip
Qt-73d9dced8298dfad7bc72607146e81e96fffb6d4.tar.gz
Qt-73d9dced8298dfad7bc72607146e81e96fffb6d4.tar.bz2
Suppress unnecessary warning messages if pbuffers are not supported
Reviewed-by: trustme
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglpixelbuffer_egl.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp
index 2b5e2f5..744fbd4 100644
--- a/src/opengl/qglpixelbuffer_egl.cpp
+++ b/src/opengl/qglpixelbuffer_egl.cpp
@@ -202,13 +202,20 @@ GLuint QGLPixelBuffer::generateDynamicTexture() const
bool QGLPixelBuffer::hasOpenGLPbuffers()
{
// See if we have at least 1 configuration that matches the default format.
- QEglContext ctx;
- if (!ctx.openDisplay(0))
+ EGLDisplay dpy = QEglContext::defaultDisplay(0);
+ if (dpy == EGL_NO_DISPLAY)
return false;
QEglProperties configProps;
qt_egl_set_format(configProps, QInternal::Pbuffer, QGLFormat::defaultFormat());
configProps.setRenderableType(QEgl::OpenGL);
- return ctx.chooseConfig(configProps, QEgl::BestPixelFormat);
+ do {
+ EGLConfig cfg = 0;
+ EGLint matching = 0;
+ if (eglChooseConfig(dpy, configProps.properties(),
+ &cfg, 1, &matching) && matching > 0)
+ return true;
+ } while (configProps.reduceConfiguration());
+ return false;
}
QT_END_NAMESPACE