diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-07-24 16:44:45 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-07-29 13:16:55 (GMT) |
commit | fd0cd53a24459e0314360d70d8499b491c06a8e4 (patch) | |
tree | 4f0343ae0c1a28f730767ab0bfc0cc42a54877dd | |
parent | 65702aa6b44568946b8c3924a45b9362401d893c (diff) | |
download | Qt-fd0cd53a24459e0314360d70d8499b491c06a8e4.zip Qt-fd0cd53a24459e0314360d70d8499b491c06a8e4.tar.gz Qt-fd0cd53a24459e0314360d70d8499b491c06a8e4.tar.bz2 |
Add a getter to QEglContext for the EGL extension string
Reviewed-By: Rhys Weatherley
-rw-r--r-- | src/gui/egl/qegl.cpp | 11 | ||||
-rw-r--r-- | src/gui/egl/qegl_p.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 89d9d1b..ebdac9a 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -400,4 +400,15 @@ void QEglContext::dumpAllConfigs() delete [] configs; } +QString QEglContext::extensions() +{ + const char* exts = eglQueryString(dpy, EGL_EXTENSIONS); + return QString(QLatin1String(exts)); +} + +bool QEglContext::hasExtension(const char* extensionName) +{ + return extensions().contains(QLatin1String(extensionName)); +} + QT_END_NAMESPACE diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index ddf7d27..3ae1489 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -122,6 +122,9 @@ public: void dumpAllConfigs(); + QString extensions(); + bool hasExtension(const char* extensionName); + private: QEgl::API apiType; EGLDisplay dpy; |