diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-06-07 10:16:41 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-06-07 10:32:17 (GMT) |
commit | 679611c26c5b7ecf63b4ed490803073a96ce9d92 (patch) | |
tree | 8bd61dcaae98a89c94b6facdc24db2a4c2754a60 /src | |
parent | d6c1894772ffd0c1ef2c4fd2c7469328dbbf9fc7 (diff) | |
download | Qt-679611c26c5b7ecf63b4ed490803073a96ce9d92.zip Qt-679611c26c5b7ecf63b4ed490803073a96ce9d92.tar.gz Qt-679611c26c5b7ecf63b4ed490803073a96ce9d92.tar.bz2 |
Protected call to glXChooseFBConfig with appropriate defines.
Reviewed-by: Trond
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qgl_x11.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 9c1f537..8194c588 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); |