QGLFormat Class Reference

#include <qgl.h>

Class Description

Definition at line 175 of file qgl.h.

Public Types

enum  OpenGLContextProfile { NoProfile, CoreProfile, CompatibilityProfile }
 
enum  OpenGLVersionFlag {
  OpenGL_Version_None = 0x00000000, OpenGL_Version_1_1 = 0x00000001, OpenGL_Version_1_2 = 0x00000002, OpenGL_Version_1_3 = 0x00000004,
  OpenGL_Version_1_4 = 0x00000008, OpenGL_Version_1_5 = 0x00000010, OpenGL_Version_2_0 = 0x00000020, OpenGL_Version_2_1 = 0x00000040,
  OpenGL_ES_Common_Version_1_0 = 0x00000080, OpenGL_ES_CommonLite_Version_1_0 = 0x00000100, OpenGL_ES_Common_Version_1_1 = 0x00000200, OpenGL_ES_CommonLite_Version_1_1 = 0x00000400,
  OpenGL_ES_Version_2_0 = 0x00000800, OpenGL_Version_3_0 = 0x00001000, OpenGL_Version_3_1 = 0x00002000, OpenGL_Version_3_2 = 0x00004000,
  OpenGL_Version_3_3 = 0x00008000, OpenGL_Version_4_0 = 0x00010000
}
 

Public Member Functions

 QGLFormat ()
 
 QGLFormat (QGL::FormatOptions options, int plane=0)
 
 QGLFormat (const QGLFormat &other)
 
QGLFormatoperator= (const QGLFormat &other)
 
 ~QGLFormat ()
 
void setDepthBufferSize (int size)
 
int depthBufferSize () const
 
void setAccumBufferSize (int size)
 
int accumBufferSize () const
 
void setRedBufferSize (int size)
 
int redBufferSize () const
 
void setGreenBufferSize (int size)
 
int greenBufferSize () const
 
void setBlueBufferSize (int size)
 
int blueBufferSize () const
 
void setAlphaBufferSize (int size)
 
int alphaBufferSize () const
 
void setStencilBufferSize (int size)
 
int stencilBufferSize () const
 
void setSampleBuffers (bool enable)
 
bool sampleBuffers () const
 
void setSamples (int numSamples)
 
int samples () const
 
void setSwapInterval (int interval)
 
int swapInterval () const
 
bool doubleBuffer () const
 
void setDoubleBuffer (bool enable)
 
bool depth () const
 
void setDepth (bool enable)
 
bool rgba () const
 
void setRgba (bool enable)
 
bool alpha () const
 
void setAlpha (bool enable)
 
bool accum () const
 
void setAccum (bool enable)
 
bool stencil () const
 
void setStencil (bool enable)
 
bool stereo () const
 
void setStereo (bool enable)
 
bool directRendering () const
 
void setDirectRendering (bool enable)
 
bool hasOverlay () const
 
void setOverlay (bool enable)
 
int plane () const
 
void setPlane (int plane)
 
void setOption (QGL::FormatOptions opt)
 
bool testOption (QGL::FormatOptions opt) const
 
void setVersion (int major, int minor)
 
int majorVersion () const
 
int minorVersion () const
 
void setProfile (OpenGLContextProfile profile)
 
OpenGLContextProfile profile () const
 

Static Public Member Functions

static QGLFormat defaultFormat ()
 
static void setDefaultFormat (const QGLFormat &f)
 
static QGLFormat defaultOverlayFormat ()
 
static void setDefaultOverlayFormat (const QGLFormat &f)
 
static bool hasOpenGL ()
 
static bool hasOpenGLOverlays ()
 
static OpenGLVersionFlags openGLVersionFlags ()
 

Friends

Q_OPENGL_EXPORT bool operator== (const QGLFormat &, const QGLFormat &)
 
Q_OPENGL_EXPORT bool operator!= (const QGLFormat &, const QGLFormat &)
 
Q_OPENGL_EXPORT QDebug operator<< (QDebug, const QGLFormat &)
 

Member Enumeration Documentation

Enumerator
NoProfile 
CoreProfile 
CompatibilityProfile 

Definition at line 252 of file qgl.h.

Enumerator
OpenGL_Version_None 
OpenGL_Version_1_1 
OpenGL_Version_1_2 
OpenGL_Version_1_3 
OpenGL_Version_1_4 
OpenGL_Version_1_5 
OpenGL_Version_2_0 
OpenGL_Version_2_1 
OpenGL_ES_Common_Version_1_0 
OpenGL_ES_CommonLite_Version_1_0 
OpenGL_ES_Common_Version_1_1 
OpenGL_ES_CommonLite_Version_1_1 
OpenGL_ES_Version_2_0 
OpenGL_Version_3_0 
OpenGL_Version_3_1 
OpenGL_Version_3_2 
OpenGL_Version_3_3 
OpenGL_Version_4_0 

Definition at line 261 of file qgl.h.

261  {
262  OpenGL_Version_None = 0x00000000,
263  OpenGL_Version_1_1 = 0x00000001,
264  OpenGL_Version_1_2 = 0x00000002,
265  OpenGL_Version_1_3 = 0x00000004,
266  OpenGL_Version_1_4 = 0x00000008,
267  OpenGL_Version_1_5 = 0x00000010,
268  OpenGL_Version_2_0 = 0x00000020,
269  OpenGL_Version_2_1 = 0x00000040,
270  OpenGL_ES_Common_Version_1_0 = 0x00000080,
272  OpenGL_ES_Common_Version_1_1 = 0x00000200,
274  OpenGL_ES_Version_2_0 = 0x00000800,
275  OpenGL_Version_3_0 = 0x00001000,
276  OpenGL_Version_3_1 = 0x00002000,
277  OpenGL_Version_3_2 = 0x00004000,
278  OpenGL_Version_3_3 = 0x00008000,
279  OpenGL_Version_4_0 = 0x00010000
280  };

Constructor & Destructor Documentation

QGLFormat ( )
QGLFormat ( QGL::FormatOptions  options,
int  plane = 0 
)
QGLFormat ( const QGLFormat other)
~QGLFormat ( )

Member Function Documentation

QGLFormat& operator= ( const QGLFormat other)
void setDepthBufferSize ( int  size)
int depthBufferSize ( ) const
void setAccumBufferSize ( int  size)
int accumBufferSize ( ) const
void setRedBufferSize ( int  size)
int redBufferSize ( ) const
void setGreenBufferSize ( int  size)
int greenBufferSize ( ) const
void setBlueBufferSize ( int  size)
int blueBufferSize ( ) const
void setAlphaBufferSize ( int  size)
int alphaBufferSize ( ) const
void setStencilBufferSize ( int  size)
int stencilBufferSize ( ) const
void setSampleBuffers ( bool  enable)
bool sampleBuffers ( ) const
inline

Definition at line 658 of file qgl.h.

659 {
661 }
bool testOption(QGL::FormatOptions opt) const
void setSamples ( int  numSamples)
int samples ( ) const
void setSwapInterval ( int  interval)
int swapInterval ( ) const
bool doubleBuffer ( ) const
inline

Definition at line 613 of file qgl.h.

614 {
616 }
bool testOption(QGL::FormatOptions opt) const
void setDoubleBuffer ( bool  enable)
bool depth ( ) const
inline

Definition at line 618 of file qgl.h.

619 {
621 }
bool testOption(QGL::FormatOptions opt) const
void setDepth ( bool  enable)
bool rgba ( ) const
inline

Definition at line 623 of file qgl.h.

624 {
625  return testOption(QGL::Rgba);
626 }
bool testOption(QGL::FormatOptions opt) const
Definition: qgl.h:147
void setRgba ( bool  enable)
bool alpha ( ) const
inline

Definition at line 628 of file qgl.h.

629 {
631 }
bool testOption(QGL::FormatOptions opt) const
void setAlpha ( bool  enable)
bool accum ( ) const
inline

Definition at line 633 of file qgl.h.

634 {
636 }
bool testOption(QGL::FormatOptions opt) const
void setAccum ( bool  enable)
bool stencil ( ) const
inline

Definition at line 638 of file qgl.h.

639 {
641 }
bool testOption(QGL::FormatOptions opt) const
void setStencil ( bool  enable)
bool stereo ( ) const
inline

Definition at line 643 of file qgl.h.

644 {
646 }
bool testOption(QGL::FormatOptions opt) const
void setStereo ( bool  enable)
bool directRendering ( ) const
inline

Definition at line 648 of file qgl.h.

649 {
651 }
bool testOption(QGL::FormatOptions opt) const
void setDirectRendering ( bool  enable)
bool hasOverlay ( ) const
inline

Definition at line 653 of file qgl.h.

654 {
655  return testOption(QGL::HasOverlay);
656 }
bool testOption(QGL::FormatOptions opt) const
void setOverlay ( bool  enable)
int plane ( ) const
void setPlane ( int  plane)
void setOption ( QGL::FormatOptions  opt)
bool testOption ( QGL::FormatOptions  opt) const
static QGLFormat defaultFormat ( )
static
static void setDefaultFormat ( const QGLFormat f)
static
static QGLFormat defaultOverlayFormat ( )
static
static void setDefaultOverlayFormat ( const QGLFormat f)
static
static bool hasOpenGL ( )
static
static bool hasOpenGLOverlays ( )
static
void setVersion ( int  major,
int  minor 
)
int majorVersion ( ) const
int minorVersion ( ) const
void setProfile ( OpenGLContextProfile  profile)
OpenGLContextProfile profile ( ) const
static OpenGLVersionFlags openGLVersionFlags ( )
static

Friends And Related Function Documentation

Q_OPENGL_EXPORT bool operator== ( const QGLFormat ,
const QGLFormat  
)
friend
Q_OPENGL_EXPORT bool operator!= ( const QGLFormat ,
const QGLFormat  
)
friend
Q_OPENGL_EXPORT QDebug operator<< ( QDebug  ,
const QGLFormat  
)
friend

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