OpenGL-2.2.1.1: A binding for the OpenGL graphics systemSource codeContentsIndex
Graphics.Rendering.OpenGL.GL.BufferObjects
Portabilityportable
Stabilitystable
Maintainersven.panne@aedion.de
Contents
Object Names
Buffer Objects
Binding Buffer Objects
Handling Buffer Data
Mapping Buffer Objects
Description
This module corresponds to section 2.9 (Buffer Objects) of the OpenGL 2.1 specs.
Synopsis
class ObjectName a where
genObjectNames :: Int -> IO [a]
deleteObjectNames :: [a] -> IO ()
isObjectName :: a -> IO Bool
newtype BufferObject = BufferObject GLuint
data BufferTarget
= ArrayBuffer
| ElementArrayBuffer
| PixelPackBuffer
| PixelUnpackBuffer
bindBuffer :: BufferTarget -> StateVar (Maybe BufferObject)
arrayBufferBinding :: ClientArrayType -> GettableStateVar (Maybe BufferObject)
data BufferUsage
= StreamDraw
| StreamRead
| StreamCopy
| StaticDraw
| StaticRead
| StaticCopy
| DynamicDraw
| DynamicRead
| DynamicCopy
bufferData :: BufferTarget -> StateVar (GLsizeiptr, Ptr a, BufferUsage)
data TransferDirection
= ReadFromBuffer
| WriteToBuffer
bufferSubData :: BufferTarget -> TransferDirection -> GLintptr -> GLsizeiptr -> Ptr a -> IO ()
data BufferAccess
= ReadOnly
| WriteOnly
| ReadWrite
data MappingFailure
= MappingFailed
| UnmappingFailed
withMappedBuffer :: BufferTarget -> BufferAccess -> (Ptr a -> IO b) -> (MappingFailure -> IO b) -> IO b
bufferAccess :: BufferTarget -> GettableStateVar BufferAccess
bufferMapped :: BufferTarget -> GettableStateVar Bool
Object Names
class ObjectName a whereSource
An ObjectName corresponds to the general OpenGL notion of an explicitly handled object name, e.g. a display list name, a texture object name, a buffer object name, etc.
Methods
genObjectNames :: Int -> IO [a]Source
deleteObjectNames :: [a] -> IO ()Source
isObjectName :: a -> IO BoolSource
show/hide Instances
Buffer Objects
newtype BufferObject Source
Constructors
BufferObject GLuint
show/hide Instances
Binding Buffer Objects
data BufferTarget Source
Constructors
ArrayBuffer
ElementArrayBuffer
PixelPackBuffer
PixelUnpackBuffer
show/hide Instances
bindBuffer :: BufferTarget -> StateVar (Maybe BufferObject)Source
arrayBufferBinding :: ClientArrayType -> GettableStateVar (Maybe BufferObject)Source
Handling Buffer Data
data BufferUsage Source
Constructors
StreamDraw
StreamRead
StreamCopy
StaticDraw
StaticRead
StaticCopy
DynamicDraw
DynamicRead
DynamicCopy
show/hide Instances
bufferData :: BufferTarget -> StateVar (GLsizeiptr, Ptr a, BufferUsage)Source
data TransferDirection Source
Constructors
ReadFromBuffer
WriteToBuffer
show/hide Instances
bufferSubData :: BufferTarget -> TransferDirection -> GLintptr -> GLsizeiptr -> Ptr a -> IO ()Source
Mapping Buffer Objects
data BufferAccess Source
Constructors
ReadOnly
WriteOnly
ReadWrite
show/hide Instances
data MappingFailure Source
Constructors
MappingFailed
UnmappingFailed
show/hide Instances
withMappedBuffer :: BufferTarget -> BufferAccess -> (Ptr a -> IO b) -> (MappingFailure -> IO b) -> IO bSource
bufferAccess :: BufferTarget -> GettableStateVar BufferAccessSource
bufferMapped :: BufferTarget -> GettableStateVar BoolSource
Produced by Haddock version 0.8