Safe Haskell | None |
---|
Graphics.GLUtil.VertexArrayObjects
Description
A thin layer over OpenGL 3.1+ vertex array objects.
- newtype VertexArrayObject = VertexArrayObject GLuint
- type VAO = VertexArrayObject
- makeVAO :: IO () -> IO VertexArrayObject
- deleteVAO :: VertexArrayObject -> IO ()
- bindVertexArray :: Maybe VertexArrayObject -> IO ()
Documentation
newtype VertexArrayObject Source
A vertex array object captures OpenGL state needed for drawing a vertex array. It encapsulates the binding of an array buffer and an element buffer, as well as vertex attribute setup.
Constructors
VertexArrayObject GLuint |
type VAO = VertexArrayObjectSource
Short alias.
makeVAO :: IO () -> IO VertexArrayObjectSource
Allocate a VertexArrayObject
, and initialize it with the
provided action. This action should bind the buffer data, index
data (if necessary), and setup vertex attributes.
deleteVAO :: VertexArrayObject -> IO ()Source
Delete a VertexArrayObject
. Do not use the VAO after running
this action!
bindVertexArray :: Maybe VertexArrayObject -> IO ()Source
Bind a VertexArrayObject
, or ensure that no VAO is bound.