summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-06-07 12:16:41 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2010-06-07 12:32:17 +0200
commit679611c26c5b7ecf63b4ed490803073a96ce9d92 (patch)
tree8bd61dcaae98a89c94b6facdc24db2a4c2754a60
parentd6c1894772ffd0c1ef2c4fd2c7469328dbbf9fc7 (diff)
downloadqt4-tools-679611c26c5b7ecf63b4ed490803073a96ce9d92.tar.gz
Protected call to glXChooseFBConfig with appropriate defines.
Reviewed-by: Trond
-rw-r--r--src/opengl/qgl_x11.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index 9c1f5372e5..8194c5881e 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -657,6 +657,11 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
d->cx = 0;
+#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX)
+ /*
+ HPUX defines GLX_VERSION_1_3 but does not implement the corresponding functions.
+ Specifically glXChooseFBConfig and glXGetVisualFromFBConfig are not implemented.
+ */
if ((major == 3 && minor >= 2) || major > 3) {
QGLTemporaryContext *tmpContext = 0;
if (!QGLContext::currentContext())
@@ -696,6 +701,12 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
if (tmpContext)
delete tmpContext;
}
+#else
+ Q_UNUSED(major);
+ Q_UNUSED(minor);
+ Q_UNUSED(profile);
+#endif
+
if (!d->cx && shareContext) {
d->cx = glXCreateContext(disp, (XVisualInfo *)d->vi,
(GLXContext)shareContext->d_func()->cx, direct);