Safe Haskell | None |
---|---|
Language | Haskell2010 |
Vertex Attribute Array.
- data LayoutElement
- type VertexAttributeLayout = [LayoutElement]
- data ComponentFormat
- elaborateLayout :: Int -> VertexAttributeLayout -> [(String, Int, Int, ComponentFormat)]
- totalLayout :: VertexAttributeLayout -> Int
- sizeOfVertexComponent :: ComponentFormat -> Int
- isNormalized :: ComponentFormat -> Bool
- setVertexAttributeLayout :: VertexAttributeLayout -> IO ()
Documentation
data LayoutElement Source
The name of a vertex input to a program combined with the component format and number of components for that attribute in the vertex data. Alternatively the size of an unused section of the data in bytes.
type VertexAttributeLayout = [LayoutElement] Source
The layout of interleaved vertex attribute data.
data ComponentFormat Source
The size and interpretation of a vertex attribute component. Normalized components will be mapped to floats in the range [0, 1].
VFloat | 4-byte float |
VByte | |
VUByte | |
VByteNormalized | |
VUByteNormalized | |
VShort | 2-byte signed integer |
VUShort | 2-byte unsigned integer |
VShortNormalized | |
VUShortNormalized | |
VInt | 4-byte signed integer |
VUInt | 4-byte unsigned integer |
VIntNormalized | |
VUIntNormalized |
elaborateLayout :: Int -> VertexAttributeLayout -> [(String, Int, Int, ComponentFormat)] Source
setVertexAttributeLayout :: VertexAttributeLayout -> IO () Source
This configures the currently bound VAO. It calls glVertexAttribPointer and glEnableVertexAttribArray.