Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QGLFormat::setDefaultOverlayFormat ( const QGLFormat f  )  [static]

Sets a new default QGLFormat for overlay contexts to f. This format is used whenever a QGLWidget is created with a format that hasOverlay() enabled.

For example, to get a double buffered overlay context (if available), use code like this:

doc/src/snippets/code/src_opengl_qgl.cpp 5

As usual, you can find out after widget creation whether the underlying OpenGL system was able to provide the requested specification:

doc/src/snippets/code/src_opengl_qgl.cpp 6

See also:

Definition at line 1190 of file qgl.cpp.

References defaultFormat(), and setOverlay().

    QGLFormat *defaultFormat = defaultOverlayFormatInstance();
    *defaultFormat = f;
    // Make sure the user doesn't request that the overlays themselves
    // have overlays, since it is unlikely that the system supports
    // infinitely many planes...

Generated by  Doxygen 1.6.0   Back to index