summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/opengl/qgl.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 3f96d1c703..8aef8b48f5 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -150,7 +150,25 @@ QGLSignalProxy *QGLSignalProxy::instance()
class QGLEngineSelector
{
public:
- QGLEngineSelector() : engineType(QPaintEngine::MaxUser) { }
+ QGLEngineSelector() : engineType(QPaintEngine::MaxUser)
+ {
+#ifdef Q_WS_MAC
+ // The ATI X1600 driver for Mac OS X does not support return
+ // values from functions in GLSL. Since working around this in
+ // the GL2 engine would require a big, ugly rewrite, we're
+ // falling back to the GL 1 engine..
+ QGLWidget *tmp = 0;
+ if (!QGLContext::currentContext()) {
+ tmp = new QGLWidget();
+ tmp->makeCurrent();
+ }
+ if (strstr((char *) glGetString(GL_RENDERER), "X1600"))
+ setPreferredPaintEngine(QPaintEngine::OpenGL);
+ if (tmp)
+ delete tmp;
+#endif
+
+ }
void setPreferredPaintEngine(QPaintEngine::Type type) {
if (type == QPaintEngine::OpenGL || type == QPaintEngine::OpenGL2)