QGL NamespaceThe QGL namespace specifies miscellaneous identifiers used in the Qt OpenGL module. More... #include <QGL> Types
Functions
Detailed DescriptionThe QGL namespace specifies miscellaneous identifiers used in the Qt OpenGL module. Type Documentation
|
Constant | Value | Description |
---|---|---|
QGL::Points | 0x0000 | Draws a point at each of the specified vertices. |
QGL::Lines | 0x0001 | Draws a series of unconnected line segments, using two vertices for each line. |
QGL::LineLoop | 0x0002 | series of connected line segments, from the first to the last vertex, and then connecting the last vertex back to the first vertex. |
QGL::LineStrip | 0x0003 | Draws a series of connected line segments, from the first to the last vertex. |
QGL::Triangles | 0x0004 | Draws a series of triangles using three vertices from the enabled vertex arrays for each triangle. |
QGL::TriangleStrip | 0x0005 | Draws a series of triangles in a strip, starting with the first three vertices and then one extra vertex for each additional triangle. |
QGL::TriangleFan | 0x0006 | Draws a series of triangles that fan out around the first vertex in the enabled vertex arrays, starting with the first three vertices and then one extra vertex for each additional triangle. |
QGL::LinesAdjacency | 0x000A | Draws a series of unconnected lines, using two vertices for each line to define the positions, and an additional vertices per line to define adjacent points. This drawing mode is only supported on OpenGL systems that have geometry shaders. |
QGL::LineStripAdjacency | 0x000B | Draws a series of connected line segments, from the second to the second last vertex. The first and last vertices define adjacent points. This drawing mode is only supported on OpenGL systems that have geometry shaders. |
QGL::TrianglesAdjacency | 0x000C | Draws a series of triangles using three vertices from the enabled vertex arrays for each triangle. An additional three vertices per triangle are supplied to define adjacent points. This drawing mode is only supported on OpenGL systems that have geometry shaders. |
QGL::TriangleStripAdjacency | 0x000D | Draws a series of triangles in a strip, with additional vertices for points adjacent to the strip. This drawing mode is only supported on OpenGL systems that have geometry shaders. |
This enum was introduced or modified in Qt 4.8.
This enum defines the eye that is being rendered by a QGLPainter when stereo rendering is in effect.
Constant | Value | Description |
---|---|---|
QGL::NoEye | 0 | Do not perform an eye adjustment on the camera because stereo rendering is not in effect. |
QGL::LeftEye | 1 | Render the scene from the perspective of the left eye. |
QGL::RightEye | 2 | Render the scene from the perspective of the right eye. |
This enum was introduced or modified in Qt 4.8.
This enum defines the faces to apply an operation to.
Constant | Value | Description |
---|---|---|
QGL::FrontFaces | 0x0404 | Apply the operation to front faces only. |
QGL::BackFaces | 0x0405 | Apply the operation to back faces only. |
QGL::AllFaces | 0x0408 | Apply the operation to both front and back faces. |
This enum was introduced or modified in Qt 4.8.
This enum specifies the format options that can be used to configure an OpenGL context. These are set using QGLFormat::setOption().
Constant | Value | Description |
---|---|---|
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. |
The FormatOptions type is a typedef for QFlags<FormatOption>. It stores an OR combination of FormatOption values.
See also Sample Buffers Example.
This is a convenience for either QArray<ushort> (OpenGL/ES) or QArray<int> (desktop OpenGL).
This enum defines extra key codes for QKeyEvent related to 3D mice devices. See QMouse3DEventProvider for further details.
Constant | Value | Description |
---|---|---|
QGL::Key_Fit | 0x01200002 | Reset the transform so the model is centered to fit within the view. |
QGL::Key_TopView | 0x01200003 | Switch to the top view. |
QGL::Key_LeftView | 0x01200004 | Switch to the left view. |
QGL::Key_RightView | 0x01200005 | Switch to the right view. |
QGL::Key_FrontView | 0x01200006 | Switch to the front view. |
QGL::Key_BottomView | 0x01200007 | Switch to the bottom view. |
QGL::Key_BackView | 0x01200008 | Switch to the back view. |
QGL::Key_RotateCW90 | 0x01200009 | Rotate clockwise by 90 degrees. |
QGL::Key_RotateCCW90 | 0x0120000a | Rotate counter-clockwise by 90 degrees. |
QGL::Key_ISO1 | 0x0120000b | Show an isometric view of the model with top, front, and right sides. |
QGL::Key_ISO2 | 0x0120000c | Show an isometric view of the model with top, back and left sides. |
QGL::Key_Button1 | 0x0120000d | Special function button 1. |
QGL::Key_Button2 | 0x0120000e | Special function button 2. |
QGL::Key_Button3 | 0x0120000f | Special function button 3. |
QGL::Key_Button4 | 0x01200010 | Special function button 4. |
QGL::Key_Button5 | 0x01200011 | Special function button 5. |
QGL::Key_Button6 | 0x01200012 | Special function button 6. |
QGL::Key_Button7 | 0x01200013 | Special function button 7. |
QGL::Key_Button8 | 0x01200014 | Special function button 8. |
QGL::Key_Button9 | 0x01200015 | Special function button 9. |
QGL::Key_Button10 | 0x01200016 | Special function button 10. |
QGL::Key_Rotations | 0x0120001b | Toggles whether or not the rotation axes on a 3D mouse will be filtered. |
QGL::Key_Translations | 0x0120001c | Toggles whether or not the translation axes on a 3D mouse will be filtered. |
QGL::Key_DominantAxis | 0x0120001d | Toggles whether or not 3D mouse movements should be constrained to the dominant axis. |
QGL::Key_IncreaseSensitivity | 0x0120001e | Increase the sensitivity of the mouse to wrist movements. |
QGL::Key_DecreaseSensitivity | 0x0120001f | Decrease the sensitivity of the mouse to wrist movements. |
This enum was introduced or modified in Qt 4.8.
This enum defines vertex smoothing treatments.
Constant | Value | Description |
---|---|---|
QGL::NoSmoothing | 0 | No smoothing processing is performed. |
QGL::Smooth | 1 | Lighting normals averaged for each face for a smooth appearance. |
QGL::Faceted | 2 | Lighting normals separate for each face for a faceted appearance. |
This enum was introduced or modified in Qt 4.8.
This enum defines a standard drawing effect for use with QGLPainter.
Constant | Value | Description |
---|---|---|
QGL::FlatColor | 0 | Single flat color specified by QGLPainter::setColor() with no lighting. |
QGL::FlatPerVertexColor | 1 | Per-vertex flat colors specified by a QGL::Color vertex array with no lighting. |
QGL::FlatReplaceTexture2D | 2 | Map a texture across the fragments with no lighting. The final fragment color is replaced directly with the texture. The texture is sourced from texture unit 0. |
QGL::FlatDecalTexture2D | 3 | Map a texture across the fragments, combined with QGLPainter::color(), and no lighting. The texture is sourced from texture unit 0. |
QGL::LitMaterial | 4 | Material colors specified by QGLPainter::setFaceMaterial() with lighting enabled. It is assumed that per-vertex normals are provided. Under OpenGL/ES 2.0 only one light is supported, with single-sided materials, and no attenuation. |
QGL::LitDecalTexture2D | 5 | Map a texture across the fragments, combined with the material color specified by QGLPainter::setFaceMaterial(), and lighting using the GL_DECAL combination rule. The texture is sourced from texture unit 0. It is assumed that per-vertex normals are provided. Under OpenGL/ES 2.0 only one light is supported, with single-sided materials, and no attenuation. |
QGL::LitModulateTexture2D | 6 | Map a texture across the fragments, combined with the material color specified by QGLPainter::setFaceMaterial(), and lighting using the GL_MODULATE combination rule. The texture is sourced from texture unit 0. It is assumed that per-vertex normals are provided. Under OpenGL/ES 2.0 only one light is supported, with single-sided materials, and no attenuation. |
This enum was introduced or modified in Qt 4.8.
This enum defines the wrapping mode for texture co-ordinates.
Constant | Value | Description |
---|---|---|
QGL::Repeat | 0x2901 | Ignore the integer part of the texture co-ordinate and create a repeating pattern using the texture. |
QGL::Clamp | ? | Clamps the texture co-ordinate to the range 0 to 1. This value is not supported in OpenGL/ES, where it will be treated the same as ClampToEdge. |
QGL::ClampToBorder | ? | Clamps the texture co-ordinate to the range (-1 / 2N) to (1 + 1 / 2N) where N is the size of the texture in the direction of clamping. This value is supported in OpenGL 1.3 and higher. In OpenGL versions less than 1.3, this value will be treated the same as Clamp. In OpenGL/ES, this value will be treated the same as ClampToEdge. |
QGL::ClampToEdge | 0x812F | Clamps the texture co-ordinate to the range (1 / 2N) to (1 - 1 / 2N) where N is the size of the texture in the direction of clamping. This value is supported in OpenGL 1.2 and higher, and in all versions of OpenGL/ES. In OpenGL versions less than 1.2, this value will be treated the same as Clamp. |
QGL::MirroredRepeat | ? | If the integer part of the texture co-ordinate is even, then use the fractional part. If the integer part of the texture co-ordinate is odd, then use 1 - the fractional part. This creates an alternating repeating pattern from the texture. This value is only supported in OpenGL 1.4 and higher, or OpenGL/ES 2.0 and higher. On other versions, MirroredRepeat will be treated the same as Repeat. |
This enum was introduced or modified in Qt 4.8.
This enum defines the type of vertex attribute to set on an effect with QGLPainter::setVertexAttribute()
Constant | Value | Description |
---|---|---|
QGL::Position | 0 | The primary position of the vertex. |
QGL::Normal | 1 | The normal at each vertex. |
QGL::Color | 2 | The color at each vertex. |
QGL::TextureCoord0 | 3 | The texture co-ordinate at each vertex for texture unit 0. |
QGL::TextureCoord1 | 4 | The texture co-ordinate at each vertex for texture unit 1. |
QGL::TextureCoord2 | 5 | The texture co-ordinate at each vertex for texture unit 2. |
QGL::CustomVertex0 | 6 | First custom vertex attribute. Custom attributes can be used for any purpose: texture co-ordinates, colors, or other values of interest to shader programs. |
QGL::CustomVertex1 | 7 | Second custom vertex attribute. |
QGL::UserVertex | 8 | First user-assigned vertex attribute. Additional attributes can be assigned as UserVertex, UserVertex + 1, etc. Note that on OpenGL/ES 2.0 systems, usually the maximum number of vertex attributes is 8, which means that user-assigned vertex attributes will be out of range. |
This enum was introduced or modified in Qt 4.8.
Returns an unsigned integer mask from the attribute.
See also QGeometryData::fields().