Commit ca5b49a2ec0ee9d7030b8d03b561717addd3441f
- Diff rendering mode:
- inline
- side by side
src/opengl/qgl.cpp
(19 / 1)
|   | |||
| 150 | 150 | class QGLEngineSelector | |
| 151 | 151 | { | |
| 152 | 152 | public: | |
| 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 | } | ||
| 154 | 172 | ||
| 155 | 173 | void setPreferredPaintEngine(QPaintEngine::Type type) { | |
| 156 | 174 | if (type == QPaintEngine::OpenGL || type == QPaintEngine::OpenGL2) |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

