summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-05-28 08:21:48 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-05-28 11:18:44 (GMT)
commitce5f9bc2a6b1945abdbdc4106be048eb9cbb7102 (patch)
tree0efd75ab96cee2494ae02fd43e885b69370c33b0 /src/opengl
parent4db48cbc4860010813b988b77d34a2606a444a3c (diff)
downloadQt-ce5f9bc2a6b1945abdbdc4106be048eb9cbb7102.zip
Qt-ce5f9bc2a6b1945abdbdc4106be048eb9cbb7102.tar.gz
Qt-ce5f9bc2a6b1945abdbdc4106be048eb9cbb7102.tar.bz2
Print the error string when surface creation fails
Reviewed-By: TrustMe
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qegl_x11egl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qegl_x11egl.cpp b/src/opengl/qegl_x11egl.cpp
index 8efe7e7..c703900 100644
--- a/src/opengl/qegl_x11egl.cpp
+++ b/src/opengl/qegl_x11egl.cpp
@@ -42,6 +42,7 @@
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qwidget.h>
+#include <QtCore/qdebug.h>
#include "qegl_p.h"
#if defined(QT_OPENGL_ES) || defined(QT_OPENVG)
@@ -80,8 +81,10 @@ bool QEglContext::createSurface(QPaintDevice *device)
surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, 0);
else
surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, 0);
+
if (surf == EGL_NO_SURFACE) {
- qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
+ qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:"
+ << errorString(eglGetError());
return false;
}
return true;