Commit ca5b49a2ec0ee9d7030b8d03b561717addd3441f

  • avatar
  • Jason McDonald <jason.mcdonald @no…a.com> (Committer)
  • Tue Oct 13 15:23:05 GMT 2009
  • avatar
  • gunnar (Author)
  • Tue Oct 13 08:18:59 UTC 2009
Work around broken ATI X1600 drivers on Mac OS X

The GLSL implementation messes up return values from functions so that
all our srcPixel()'s become black and several matrices are off. We
don't want to rewrite the shader code to fit an "ancient" graphics
card, so we simply fall back to the GL 1 engine.

Reviewed-by: Trond
(cherry picked from commit 33ed3d0bacddce214a43be60eb6481903e753a88)
(cherry picked from commit bd94c6df873ab196e537f5a49b57c86ccd66ad90)
src/opengl/qgl.cpp
(19 / 1)
  
150150class QGLEngineSelector
151151{
152152public:
153 QGLEngineSelector() : engineType(QPaintEngine::MaxUser) { }
153 QGLEngineSelector() : engineType(QPaintEngine::MaxUser)
154 {
155#ifdef Q_WS_MAC
156 // The ATI X1600 driver for Mac OS X does not support return
157 // values from functions in GLSL. Since working around this in
158 // the GL2 engine would require a big, ugly rewrite, we're
159 // falling back to the GL 1 engine..
160 QGLWidget *tmp = 0;
161 if (!QGLContext::currentContext()) {
162 tmp = new QGLWidget();
163 tmp->makeCurrent();
164 }
165 if (strstr((char *) glGetString(GL_RENDERER), "X1600"))
166 setPreferredPaintEngine(QPaintEngine::OpenGL);
167 if (tmp)
168 delete tmp;
169#endif
170
171 }
154172
155173 void setPreferredPaintEngine(QPaintEngine::Type type) {
156174 if (type == QPaintEngine::OpenGL || type == QPaintEngine::OpenGL2)

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment