OpenGL-2.2.1.1: A binding for the OpenGL graphics systemSource codeContentsIndex
Graphics.Rendering.OpenGL.GL.VertexArrays
Portabilityportable
Stabilitystable
Maintainersven.panne@aedion.de
Contents
Describing Data for the Arrays
Specifying Data for the Arrays
Enabling Arrays
Dereferencing and Rendering
Description
This module corresponds to section 2.8 (Vertex Arrays) of the OpenGL 2.1 specs.
Synopsis
type NumComponents = GLint
data DataType
= Byte
| UnsignedByte
| Short
| UnsignedShort
| Int
| UnsignedInt
| Float
| TwoBytes
| ThreeBytes
| FourBytes
| Double
| Bitmap
| UnsignedByte332
| UnsignedShort4444
| UnsignedShort5551
| UnsignedInt8888
| UnsignedInt1010102
| UnsignedByte233Rev
| UnsignedShort565
| UnsignedShort565Rev
| UnsignedShort4444Rev
| UnsignedShort1555Rev
| UnsignedInt8888Rev
| UnsignedInt2101010Rev
| UnsignedShort88
| UnsignedShort88Rev
| UnsignedInt248
type Stride = GLsizei
data VertexArrayDescriptor a = VertexArrayDescriptor !NumComponents !DataType !Stride !(Ptr a)
data ClientArrayType
= VertexArray
| NormalArray
| ColorArray
| IndexArray
| TextureCoordArray
| EdgeFlagArray
| FogCoordArray
| SecondaryColorArray
| MatrixIndexArray
arrayPointer :: ClientArrayType -> StateVar (VertexArrayDescriptor a)
data InterleavedArrays
= V2f
| V3f
| C4ubV2f
| C4ubV3f
| C3fV3f
| N3fV3f
| C4fN3fV3f
| T2fV3f
| T4fV4f
| T2fC4ubV3f
| T2fC3fV3f
| T2fN3fV3f
| T2fC4fN3fV3f
| T4fC4fN3fV4f
interleavedArrays :: InterleavedArrays -> Stride -> Ptr a -> IO ()
clientState :: ClientArrayType -> StateVar Capability
clientActiveTexture :: StateVar TextureUnit
type ArrayIndex = GLint
type NumArrayIndices = GLsizei
type NumIndexBlocks = GLsizei
arrayElement :: ArrayIndex -> IO ()
drawArrays :: PrimitiveMode -> ArrayIndex -> NumArrayIndices -> IO ()
multiDrawArrays :: PrimitiveMode -> Ptr ArrayIndex -> Ptr NumArrayIndices -> NumIndexBlocks -> IO ()
drawElements :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> IO ()
multiDrawElements :: PrimitiveMode -> Ptr NumArrayIndices -> DataType -> Ptr (Ptr a) -> NumIndexBlocks -> IO ()
drawRangeElements :: PrimitiveMode -> (ArrayIndex, ArrayIndex) -> NumArrayIndices -> DataType -> Ptr a -> IO ()
maxElementsVertices :: GettableStateVar NumArrayIndices
maxElementsIndices :: GettableStateVar NumArrayIndices
lockArrays :: StateVar (Maybe (ArrayIndex, NumArrayIndices))
primitiveRestartIndex :: StateVar (Maybe ArrayIndex)
Describing Data for the Arrays
type NumComponents = GLintSource
data DataType Source
Constructors
Byte
UnsignedByte
Short
UnsignedShort
Int
UnsignedInt
Float
TwoBytes
ThreeBytes
FourBytes
Double
Bitmap
UnsignedByte332
UnsignedShort4444
UnsignedShort5551
UnsignedInt8888
UnsignedInt1010102
UnsignedByte233Rev
UnsignedShort565
UnsignedShort565Rev
UnsignedShort4444Rev
UnsignedShort1555Rev
UnsignedInt8888Rev
UnsignedInt2101010Rev
UnsignedShort88
UnsignedShort88Rev
UnsignedInt248
show/hide Instances
type Stride = GLsizeiSource
data VertexArrayDescriptor aSource
Constructors
VertexArrayDescriptor !NumComponents !DataType !Stride !(Ptr a)
show/hide Instances
Specifying Data for the Arrays
data ClientArrayType Source
Constructors
VertexArray
NormalArray
ColorArray
IndexArray
TextureCoordArray
EdgeFlagArray
FogCoordArray
SecondaryColorArray
MatrixIndexArray
show/hide Instances
arrayPointer :: ClientArrayType -> StateVar (VertexArrayDescriptor a)Source
data InterleavedArrays Source
Constructors
V2f
V3f
C4ubV2f
C4ubV3f
C3fV3f
N3fV3f
C4fN3fV3f
T2fV3f
T4fV4f
T2fC4ubV3f
T2fC3fV3f
T2fN3fV3f
T2fC4fN3fV3f
T4fC4fN3fV4f
show/hide Instances
interleavedArrays :: InterleavedArrays -> Stride -> Ptr a -> IO ()Source
Enabling Arrays
clientState :: ClientArrayType -> StateVar CapabilitySource
clientActiveTexture :: StateVar TextureUnitSource
Dereferencing and Rendering
type ArrayIndex = GLintSource
type NumArrayIndices = GLsizeiSource
type NumIndexBlocks = GLsizeiSource
arrayElement :: ArrayIndex -> IO ()Source
drawArrays :: PrimitiveMode -> ArrayIndex -> NumArrayIndices -> IO ()Source
multiDrawArrays :: PrimitiveMode -> Ptr ArrayIndex -> Ptr NumArrayIndices -> NumIndexBlocks -> IO ()Source
drawElements :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> IO ()Source
multiDrawElements :: PrimitiveMode -> Ptr NumArrayIndices -> DataType -> Ptr (Ptr a) -> NumIndexBlocks -> IO ()Source
drawRangeElements :: PrimitiveMode -> (ArrayIndex, ArrayIndex) -> NumArrayIndices -> DataType -> Ptr a -> IO ()Source
maxElementsVertices :: GettableStateVar NumArrayIndicesSource
maxElementsIndices :: GettableStateVar NumArrayIndicesSource
lockArrays :: StateVar (Maybe (ArrayIndex, NumArrayIndices))Source
primitiveRestartIndex :: StateVar (Maybe ArrayIndex)Source
Produced by Haddock version 0.9