Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QGL Namespace

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

 #include <QGL>

Types

enum DrawingMode { Points, Lines, LineLoop, LineStrip, ..., TriangleStripAdjacency }
enum Eye { NoEye, LeftEye, RightEye }
enum Face { FrontFaces, BackFaces, AllFaces }
enum FormatOption { DoubleBuffer, DepthBuffer, Rgba, AlphaChannel, ..., NoDeprecatedFunctions }
flags FormatOptions
typedef IndexArray
enum Mouse3DKeys { Key_Fit, Key_TopView, Key_LeftView, Key_RightView, ..., Key_DecreaseSensitivity }
enum Smoothing { NoSmoothing, Smooth, Faceted }
enum StandardEffect { FlatColor, FlatPerVertexColor, FlatReplaceTexture2D, FlatDecalTexture2D, ..., LitModulateTexture2D }
enum TextureWrap { Repeat, Clamp, ClampToBorder, ClampToEdge, MirroredRepeat }
enum VertexAttribute { Position, Normal, Color, TextureCoord0, ..., UserVertex }

Functions

quint32 fieldMask(QGL::VertexAttribute attribute)

Detailed Description

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

Type Documentation

enum QGL::DrawingMode

This enum defines the type of OpenGL primitive to render with QGLPainter::draw().

ConstantValueDescription
QGL::Points0x0000Draws a point at each of the specified vertices.
QGL::Lines0x0001Draws a series of unconnected line segments, using two vertices for each line.
QGL::LineLoop0x0002series of connected line segments, from the first to the last vertex, and then connecting the last vertex back to the first vertex.
QGL::LineStrip0x0003Draws a series of connected line segments, from the first to the last vertex.
QGL::Triangles0x0004Draws a series of triangles using three vertices from the enabled vertex arrays for each triangle.
QGL::TriangleStrip0x0005Draws a series of triangles in a strip, starting with the first three vertices and then one extra vertex for each additional triangle.
QGL::TriangleFan0x0006Draws 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::LinesAdjacency0x000ADraws 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::LineStripAdjacency0x000BDraws 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::TrianglesAdjacency0x000CDraws 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::TriangleStripAdjacency0x000DDraws 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.

enum QGL::Eye

This enum defines the eye that is being rendered by a QGLPainter when stereo rendering is in effect.

ConstantValueDescription
QGL::NoEye0Do not perform an eye adjustment on the camera because stereo rendering is not in effect.
QGL::LeftEye1Render the scene from the perspective of the left eye.
QGL::RightEye2Render the scene from the perspective of the right eye.

This enum was introduced or modified in Qt 4.8.

enum QGL::Face

This enum defines the faces to apply an operation to.

ConstantValueDescription
QGL::FrontFaces0x0404Apply the operation to front faces only.
QGL::BackFaces0x0405Apply the operation to back faces only.
QGL::AllFaces0x0408Apply the operation to both front and back faces.

This enum was introduced or modified in Qt 4.8.

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().

ConstantValueDescription
QGL::DoubleBuffer0x0001Specifies the use of double buffering.
QGL::DepthBuffer0x0002Enables the use of a depth buffer.
QGL::Rgba0x0004Specifies that the context should use RGBA as its pixel format.
QGL::AlphaChannel0x0008Enables the use of an alpha channel.
QGL::AccumBuffer0x0010Enables the use of an accumulation buffer.
QGL::StencilBuffer0x0020Enables the use of a stencil buffer.
QGL::StereoBuffers0x0040Enables the use of a stereo buffers for use with visualization hardware.
QGL::DirectRendering0x0080Specifies that the context is used for direct rendering to a display.
QGL::HasOverlay0x0100Enables the use of an overlay.
QGL::SampleBuffers0x0200Enables the use of sample buffers.
QGL::DeprecatedFunctions0x0400Enables 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::SingleBufferDoubleBuffer<<16Specifies the use of a single buffer, as opposed to double buffers.
QGL::NoDepthBufferDepthBuffer<<16Disables the use of a depth buffer.
QGL::ColorIndexRgba<<16Specifies that the context should use a color index as its pixel format.
QGL::NoAlphaChannelAlphaChannel<<16Disables the use of an alpha channel.
QGL::NoAccumBufferAccumBuffer<<16Disables the use of an accumulation buffer.
QGL::NoStencilBufferStencilBuffer<<16Disables the use of a stencil buffer.
QGL::NoStereoBuffersStereoBuffers<<16Disables the use of stereo buffers.
QGL::IndirectRenderingDirectRendering<<16Specifies that the context is used for indirect rendering to a buffer.
QGL::NoOverlayHasOverlay<<16Disables the use of an overlay.
QGL::NoSampleBuffersSampleBuffers<<16Disables the use of sample buffers.
QGL::NoDeprecatedFunctionsDeprecatedFunctions<<16Disables 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.

typedef QGL::IndexArray

This is a convenience for either QArray<ushort> (OpenGL/ES) or QArray<int> (desktop OpenGL).

enum QGL::Mouse3DKeys

This enum defines extra key codes for QKeyEvent related to 3D mice devices. See QMouse3DEventProvider for further details.

ConstantValueDescription
QGL::Key_Fit0x01200002Reset the transform so the model is centered to fit within the view.
QGL::Key_TopView0x01200003Switch to the top view.
QGL::Key_LeftView0x01200004Switch to the left view.
QGL::Key_RightView0x01200005Switch to the right view.
QGL::Key_FrontView0x01200006Switch to the front view.
QGL::Key_BottomView0x01200007Switch to the bottom view.
QGL::Key_BackView0x01200008Switch to the back view.
QGL::Key_RotateCW900x01200009Rotate clockwise by 90 degrees.
QGL::Key_RotateCCW900x0120000aRotate counter-clockwise by 90 degrees.
QGL::Key_ISO10x0120000bShow an isometric view of the model with top, front, and right sides.
QGL::Key_ISO20x0120000cShow an isometric view of the model with top, back and left sides.
QGL::Key_Button10x0120000dSpecial function button 1.
QGL::Key_Button20x0120000eSpecial function button 2.
QGL::Key_Button30x0120000fSpecial function button 3.
QGL::Key_Button40x01200010Special function button 4.
QGL::Key_Button50x01200011Special function button 5.
QGL::Key_Button60x01200012Special function button 6.
QGL::Key_Button70x01200013Special function button 7.
QGL::Key_Button80x01200014Special function button 8.
QGL::Key_Button90x01200015Special function button 9.
QGL::Key_Button100x01200016Special function button 10.
QGL::Key_Rotations0x0120001bToggles whether or not the rotation axes on a 3D mouse will be filtered.
QGL::Key_Translations0x0120001cToggles whether or not the translation axes on a 3D mouse will be filtered.
QGL::Key_DominantAxis0x0120001dToggles whether or not 3D mouse movements should be constrained to the dominant axis.
QGL::Key_IncreaseSensitivity0x0120001eIncrease the sensitivity of the mouse to wrist movements.
QGL::Key_DecreaseSensitivity0x0120001fDecrease the sensitivity of the mouse to wrist movements.

This enum was introduced or modified in Qt 4.8.

enum QGL::Smoothing

This enum defines vertex smoothing treatments.

ConstantValueDescription
QGL::NoSmoothing0No smoothing processing is performed.
QGL::Smooth1Lighting normals averaged for each face for a smooth appearance.
QGL::Faceted2Lighting normals separate for each face for a faceted appearance.

This enum was introduced or modified in Qt 4.8.

enum QGL::StandardEffect

This enum defines a standard drawing effect for use with QGLPainter.

ConstantValueDescription
QGL::FlatColor0Single flat color specified by QGLPainter::setColor() with no lighting.
QGL::FlatPerVertexColor1Per-vertex flat colors specified by a QGL::Color vertex array with no lighting.
QGL::FlatReplaceTexture2D2Map 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::FlatDecalTexture2D3Map a texture across the fragments, combined with QGLPainter::color(), and no lighting. The texture is sourced from texture unit 0.
QGL::LitMaterial4Material 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::LitDecalTexture2D5Map 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::LitModulateTexture2D6Map 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.

enum QGL::TextureWrap

This enum defines the wrapping mode for texture co-ordinates.

ConstantValueDescription
QGL::Repeat0x2901Ignore 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::ClampToEdge0x812FClamps 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.

enum QGL::VertexAttribute

This enum defines the type of vertex attribute to set on an effect with QGLPainter::setVertexAttribute()

ConstantValueDescription
QGL::Position0The primary position of the vertex.
QGL::Normal1The normal at each vertex.
QGL::Color2The color at each vertex.
QGL::TextureCoord03The texture co-ordinate at each vertex for texture unit 0.
QGL::TextureCoord14The texture co-ordinate at each vertex for texture unit 1.
QGL::TextureCoord25The texture co-ordinate at each vertex for texture unit 2.
QGL::CustomVertex06First custom vertex attribute. Custom attributes can be used for any purpose: texture co-ordinates, colors, or other values of interest to shader programs.
QGL::CustomVertex17Second custom vertex attribute.
QGL::UserVertex8First 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.

Function Documentation

quint32 QGL::fieldMask(QGL::VertexAttribute attribute)

Returns an unsigned integer mask from the attribute.

See also QGeometryData::fields().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web