- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Friends

# QGLFormat Class Reference

Search for all occurrences

## Detailed Description

Definition at line 167 of file qgl.h.

`#include <qgl.h>`

List of all members.

## 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)
QGLFormat & | operator= (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

enum OpenGLContextProfile

Search for all occurrences

Enumerator:

  NoProfile | Search for all occurrences
  CoreProfile | Search for all occurrences
  CompatibilityProfile | Search for all occurrences

Definition at line 244 of file qgl.h.

                                  {
            NoProfile,
            CoreProfile,
            CompatibilityProfile
        };

enum OpenGLVersionFlag

Search for all occurrences

Enumerator:

  OpenGL_Version_None | Search for all occurrences
  OpenGL_Version_1_1 | Search for all occurrences
  OpenGL_Version_1_2 | Search for all occurrences
  OpenGL_Version_1_3 | Search for all occurrences
  OpenGL_Version_1_4 | Search for all occurrences
  OpenGL_Version_1_5 | Search for all occurrences
  OpenGL_Version_2_0 | Search for all occurrences
  OpenGL_Version_2_1 | Search for all occurrences
  OpenGL_ES_Common_Version_1_0 | Search for all occurrences
  OpenGL_ES_CommonLite_Version_1_0 | Search for all occurrences
  OpenGL_ES_Common_Version_1_1 | Search for all occurrences
  OpenGL_ES_CommonLite_Version_1_1 | Search for all occurrences
  OpenGL_ES_Version_2_0 | Search for all occurrences
  OpenGL_Version_3_0 | Search for all occurrences
  OpenGL_Version_3_1 | Search for all occurrences
  OpenGL_Version_3_2 | Search for all occurrences
  OpenGL_Version_3_3 | Search for all occurrences
  OpenGL_Version_4_0 | Search for all occurrences

Definition at line 253 of file qgl.h.

                               {
            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
        };

## 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 | ) |

Search for all occurrences

int depthBufferSize | ( |  | ) | const

Search for all occurrences

void setAccumBufferSize | ( | int | size | ) |

Search for all occurrences

int accumBufferSize | ( |  | ) | const

Search for all occurrences

void setRedBufferSize | ( | int | size | ) |

Search for all occurrences

int redBufferSize | ( |  | ) | const

Search for all occurrences

void setGreenBufferSize | ( | int | size | ) |

Search for all occurrences

int greenBufferSize | ( |  | ) | const

Search for all occurrences

void setBlueBufferSize | ( | int | size | ) |

Search for all occurrences

int blueBufferSize | ( |  | ) | const

Search for all occurrences

void setAlphaBufferSize | ( | int | size | ) |

Search for all occurrences

int alphaBufferSize | ( |  | ) | const

Search for all occurrences

void setStencilBufferSize | ( | int | size | ) |

Search for all occurrences

int stencilBufferSize | ( |  | ) | const

Search for all occurrences

void setSampleBuffers | ( | bool | enable | ) |

Search for all occurrences

bool sampleBuffers | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 636 of file qgl.h.

    {
        return testOption(QGL::SampleBuffers);
    }

void setSamples | ( | int | numSamples | ) |

Search for all occurrences

int samples | ( |  | ) | const

Search for all occurrences

void setSwapInterval | ( | int | interval | ) |

Search for all occurrences

int swapInterval | ( |  | ) | const

Search for all occurrences

bool doubleBuffer | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 591 of file qgl.h.

    {
        return testOption(QGL::DoubleBuffer);
    }

void setDoubleBuffer | ( | bool | enable | ) |

Search for all occurrences

bool depth | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 596 of file qgl.h.

    {
        return testOption(QGL::DepthBuffer);
    }

void setDepth | ( | bool | enable | ) |

Search for all occurrences

bool rgba | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 601 of file qgl.h.

    {
        return testOption(QGL::Rgba);
    }

void setRgba | ( | bool | enable | ) |

Search for all occurrences

bool alpha | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 606 of file qgl.h.

    {
        return testOption(QGL::AlphaChannel);
    }

void setAlpha | ( | bool | enable | ) |

Search for all occurrences

bool accum | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 611 of file qgl.h.

    {
        return testOption(QGL::AccumBuffer);
    }

void setAccum | ( | bool | enable | ) |

Search for all occurrences

bool stencil | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 616 of file qgl.h.

    {
        return testOption(QGL::StencilBuffer);
    }

void setStencil | ( | bool | enable | ) |

Search for all occurrences

bool stereo | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 621 of file qgl.h.

    {
        return testOption(QGL::StereoBuffers);
    }

void setStereo | ( | bool | enable | ) |

Search for all occurrences

bool directRendering | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 626 of file qgl.h.

    {
        return testOption(QGL::DirectRendering);
    }

void setDirectRendering | ( | bool | enable | ) |

Search for all occurrences

bool hasOverlay | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 631 of file qgl.h.

    {
        return testOption(QGL::HasOverlay);
    }

void setOverlay | ( | bool | enable | ) |

Search for all occurrences

int plane | ( |  | ) | const

Search for all occurrences

void setPlane | ( | int | plane | ) |

Search for all occurrences

void setOption | ( | QGL::FormatOptions | opt | ) |

Search for all occurrences

bool testOption | ( | QGL::FormatOptions | opt | ) | const

Search for all occurrences

static QGLFormat defaultFormat | ( |  | ) | `[static]`

Search for all occurrences

static void setDefaultFormat | ( | const QGLFormat & | f | ) | `[static]`

Search for all occurrences

static QGLFormat defaultOverlayFormat | ( |  | ) | `[static]`

Search for all occurrences

static void setDefaultOverlayFormat | ( | const QGLFormat & | f | ) | `[static]`

Search for all occurrences

static bool hasOpenGL | ( |  | ) | `[static]`

Search for all occurrences

static bool hasOpenGLOverlays | ( |  | ) | `[static]`

Search for all occurrences

void setVersion | ( | int | major,
|  | int | minor
| ) |  |

Search for all occurrences

int majorVersion | ( |  | ) | const

Search for all occurrences

int minorVersion | ( |  | ) | const

Search for all occurrences

void setProfile | ( | OpenGLContextProfile | profile | ) |

Search for all occurrences

OpenGLContextProfile profile | ( |  | ) | const

Search for all occurrences

static OpenGLVersionFlags openGLVersionFlags | ( |  | ) | `[static]`

Search for all occurrences

## 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:

- QtOpenGL/qgl.h

QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat
QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat QGLFormat