QGL Namespace

The QGL namespace specifies miscellaneous identifiers used in the Qt OpenGL module. 更多...

头: #include <QGL>
qmake: QT += opengl

    类型

    enum FormatOption { DoubleBuffer, DepthBuffer, Rgba, AlphaChannel, ..., NoDeprecatedFunctions }
    flags FormatOptions

    详细描述

    The QGL namespace specifies miscellaneous identifiers used in the Qt OpenGL module.

    类型文档编制

    enum QGL:: FormatOption
    flags QGL:: FormatOptions

    This enum specifies the format options that can be used to configure an OpenGL context. These are set using QGLFormat::setOption ().

    常量 描述
    QGL::DoubleBuffer 0x0001 Specifies the use of double buffering.
    QGL::DepthBuffer 0x0002 Enables the use of a depth buffer.
    QGL::Rgba 0x0004 Specifies that the context should use RGBA as its pixel format.
    QGL::AlphaChannel 0x0008 Enables the use of an alpha channel.
    QGL::AccumBuffer 0x0010 Enables the use of an accumulation buffer.
    QGL::StencilBuffer 0x0020 Enables the use of a stencil buffer.
    QGL::StereoBuffers 0x0040 Enables the use of a stereo buffers for use with visualization hardware.
    QGL::DirectRendering 0x0080 Specifies that the context is used for direct rendering to a display.
    QGL::HasOverlay 0x0100 Enables the use of an overlay.
    QGL::SampleBuffers 0x0200 Enables the use of sample buffers.
    QGL::DeprecatedFunctions 0x0400 Enables the use of deprecated functionality for OpenGL 3.x contexts. A context with deprecated functionality enabled is called a full context in the OpenGL specification.
    QGL::SingleBuffer DoubleBuffer<<16 Specifies the use of a single buffer, as opposed to double buffers.
    QGL::NoDepthBuffer DepthBuffer<<16 Disables the use of a depth buffer.
    QGL::ColorIndex Rgba<<16 Specifies that the context should use a color index as its pixel format.
    QGL::NoAlphaChannel AlphaChannel<<16 Disables the use of an alpha channel.
    QGL::NoAccumBuffer AccumBuffer<<16 Disables the use of an accumulation buffer.
    QGL::NoStencilBuffer StencilBuffer<<16 Disables the use of a stencil buffer.
    QGL::NoStereoBuffers StereoBuffers<<16 Disables the use of stereo buffers.
    QGL::IndirectRendering DirectRendering<<16 Specifies that the context is used for indirect rendering to a buffer.
    QGL::NoOverlay HasOverlay<<16 Disables the use of an overlay.
    QGL::NoSampleBuffers SampleBuffers<<16 Disables the use of sample buffers.
    QGL::NoDeprecatedFunctions DeprecatedFunctions<<16 Disables the use of deprecated functionality for OpenGL 3.x contexts. A context with deprecated functionality disabled is called a forward compatible context in the OpenGL specification.

    FormatOptions 类型是 typedef 对于 QFlags <FormatOption>。它存储 FormatOption 值的 OR 组合。