Portability | portable |
---|---|
Stability | stable |
Maintainer | sven.panne@aedion.de |
Graphics.Rendering.OpenGL.GL.BufferObjects
Contents
Description
This module corresponds to section 2.9 (Buffer Objects) of the OpenGL 2.1 specs.
- module Data.ObjectName
- newtype BufferObject = BufferObject GLuint
- data BufferTarget
- bindBuffer :: BufferTarget -> StateVar (Maybe BufferObject)
- arrayBufferBinding :: ClientArrayType -> GettableStateVar (Maybe BufferObject)
- vertexAttribArrayBufferBinding :: AttribLocation -> GettableStateVar (Maybe BufferObject)
- data BufferUsage
- = StreamDraw
- | StreamRead
- | StreamCopy
- | StaticDraw
- | StaticRead
- | StaticCopy
- | DynamicDraw
- | DynamicRead
- | DynamicCopy
- bufferData :: BufferTarget -> StateVar (GLsizeiptr, Ptr a, BufferUsage)
- data TransferDirection
- bufferSubData :: BufferTarget -> TransferDirection -> GLintptr -> GLsizeiptr -> Ptr a -> IO ()
- data BufferAccess
- data MappingFailure
- withMappedBuffer :: BufferTarget -> BufferAccess -> (Ptr a -> IO b) -> (MappingFailure -> IO b) -> IO b
- mapBuffer :: BufferTarget -> BufferAccess -> IO (Maybe (Ptr a))
- unmapBuffer :: BufferTarget -> IO Bool
- bufferAccess :: BufferTarget -> GettableStateVar BufferAccess
- bufferMapped :: BufferTarget -> GettableStateVar Bool
Object Names
module Data.ObjectName
Buffer Objects
newtype BufferObject Source
Constructors
BufferObject GLuint |
Binding Buffer Objects
data BufferTarget Source
Constructors
ArrayBuffer | |
CopyReadBuffer | |
CopyWriteBuffer | |
ElementArrayBuffer | |
PixelPackBuffer | |
PixelUnpackBuffer |
Instances
Handling Buffer Data
data BufferUsage Source
Constructors
StreamDraw | |
StreamRead | |
StreamCopy | |
StaticDraw | |
StaticRead | |
StaticCopy | |
DynamicDraw | |
DynamicRead | |
DynamicCopy |
Instances
bufferData :: BufferTarget -> StateVar (GLsizeiptr, Ptr a, BufferUsage)Source
data TransferDirection Source
Constructors
ReadFromBuffer | |
WriteToBuffer |
bufferSubData :: BufferTarget -> TransferDirection -> GLintptr -> GLsizeiptr -> Ptr a -> IO ()Source
Mapping Buffer Objects
data BufferAccess Source
Instances
withMappedBuffer :: BufferTarget -> BufferAccess -> (Ptr a -> IO b) -> (MappingFailure -> IO b) -> IO bSource
Convenience function for an exception-safe combination of mapBuffer
and
unmapBuffer
.
mapBuffer :: BufferTarget -> BufferAccess -> IO (Maybe (Ptr a))Source
unmapBuffer :: BufferTarget -> IO BoolSource