| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.GL.Low.VertexAttrib
Description
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.
Constructors
| Attrib String Int ComponentFormat | Name, component count and component format of a vertex attribute. |
| Unused Int | Size in bytes of an unused section of the vertex data. |
Instances
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].
Constructors
| 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 |
Instances
elaborateLayout :: Int -> VertexAttributeLayout -> [(String, Int, Int, ComponentFormat)]
isNormalized :: ComponentFormat -> Bool
setVertexAttributeLayout :: VertexAttributeLayout -> IO ()
This configures the currently bound VAO. It calls glVertexAttribPointer and glEnableVertexAttribArray.