Qt 4.8
Public Functions | Properties | List of all members
QGLEngineSelector Class Reference

Public Functions

QPaintEngine::Type preferredPaintEngine ()
 
 QGLEngineSelector ()
 
void setPreferredPaintEngine (QPaintEngine::Type type)
 

Properties

QPaintEngine::Type engineType
 

Detailed Description

Definition at line 159 of file qgl.cpp.

Constructors and Destructors

◆ QGLEngineSelector()

QGLEngineSelector::QGLEngineSelector ( )
inline

Definition at line 162 of file qgl.cpp.

163  {
164  }
QPaintEngine::Type engineType
Definition: qgl.cpp:212

Functions

◆ preferredPaintEngine()

QPaintEngine::Type QGLEngineSelector::preferredPaintEngine ( )
inline

Definition at line 171 of file qgl.cpp.

171  {
172 #ifdef Q_WS_MAC
173  // The ATI X1600 driver for Mac OS X does not support return
174  // values from functions in GLSL. Since working around this in
175  // the GL2 engine would require a big, ugly rewrite, we're
176  // falling back to the GL 1 engine..
177  static bool mac_x1600_check_done = false;
178  if (!mac_x1600_check_done) {
179  QGLTemporaryContext *tmp = 0;
181  tmp = new QGLTemporaryContext();
182  if (strstr((char *) glGetString(GL_RENDERER), "X1600"))
184  if (tmp)
185  delete tmp;
186  mac_x1600_check_done = true;
187  }
188 #endif
190  // No user-set engine - use the defaults
191 #if defined(QT_OPENGL_ES_2)
193 #else
194  // We can't do this in the constructor for this object because it
195  // needs to be called *before* the QApplication constructor.
196  // Also check for the FragmentShader extension in conjunction with
197  // the 2.0 version flag, to cover the case where we export the display
198  // from an old GL 1.1 server to a GL 2.x client. In that case we can't
199  // use GL 2.0.
202  && qgetenv("QT_GL_USE_OPENGL1ENGINE").isEmpty())
204  else
206 #endif
207  }
208  return engineType;
209  }
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
static OpenGLVersionFlags openGLVersionFlags()
QPaintEngine::Type engineType
Definition: qgl.cpp:212
static const QGLContext * currentContext()
Returns the current context, i.e.
Definition: qgl.cpp:3545
static bool isEmpty(const char *str)
#define GL_RENDERER
static Extensions glExtensions()
Definition: qgl.cpp:5781

◆ setPreferredPaintEngine()

void QGLEngineSelector::setPreferredPaintEngine ( QPaintEngine::Type  type)
inline

Definition at line 166 of file qgl.cpp.

166  {
168  engineType = type;
169  }
int type
Definition: qmetatype.cpp:239
QPaintEngine::Type engineType
Definition: qgl.cpp:212

Properties

◆ engineType

QPaintEngine::Type QGLEngineSelector::engineType
private

Definition at line 212 of file qgl.cpp.


The documentation for this class was generated from the following file: