GLUtil-0.2.1: Miscellaneous OpenGL utilities.

Safe HaskellNone



A thin layer over OpenGL 3.1+ vertex array objects.



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.

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.