From 679611c26c5b7ecf63b4ed490803073a96ce9d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 7 Jun 2010 12:16:41 +0200 Subject: Protected call to glXChooseFBConfig with appropriate defines. Reviewed-by: Trond --- src/opengl/qgl_x11.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- cgit v0.12