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
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]
The layout of interleaved vertex attribute data.
data ComponentFormat
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)]
isNormalized :: ComponentFormat -> Bool
setVertexAttributeLayout :: VertexAttributeLayout -> IO ()
This configures the currently bound VAO. It calls glVertexAttribPointer and glEnableVertexAttribArray.