Copyright | (c) Sven Panne 2002-2016 |
---|---|
License | BSD3 |
Maintainer | Sven Panne <svenpanne@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module corresponds to section 2.9 (Buffer Objects) of the OpenGL 2.1 specs.
- data BufferObject
- data BufferTarget
- bindBuffer :: BufferTarget -> StateVar (Maybe BufferObject)
- arrayBufferBinding :: ClientArrayType -> GettableStateVar (Maybe BufferObject)
- vertexAttribArrayBufferBinding :: AttribLocation -> GettableStateVar (Maybe BufferObject)
- data BufferUsage
- 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
- data MapBufferUsage
- type Offset = GLintptr
- type Length = GLsizeiptr
- mapBufferRange :: BufferTarget -> Offset -> Length -> [MapBufferUsage] -> IO (Maybe (Ptr a))
- flushMappedBufferRange :: BufferTarget -> Offset -> Length -> IO ()
- type BufferIndex = GLuint
- type RangeStartIndex = GLintptr
- type RangeSize = GLsizeiptr
- type BufferRange = (BufferObject, RangeStartIndex, RangeSize)
- data IndexedBufferTarget
- bindBufferBase :: IndexedBufferTarget -> BufferIndex -> StateVar (Maybe BufferObject)
- bindBufferRange :: IndexedBufferTarget -> BufferIndex -> StateVar (Maybe BufferRange)
- indexedBufferStart :: IndexedBufferTarget -> BufferIndex -> GettableStateVar RangeStartIndex
- indexedBufferSize :: IndexedBufferTarget -> BufferIndex -> GettableStateVar RangeSize
Buffer Objects
data BufferObject Source
Binding Buffer Objects
data BufferTarget Source
Handling Buffer Data
data BufferUsage Source
bufferData :: BufferTarget -> StateVar (GLsizeiptr, Ptr a, BufferUsage) Source
data TransferDirection Source
bufferSubData :: BufferTarget -> TransferDirection -> GLintptr -> GLsizeiptr -> Ptr a -> IO () Source
Mapping Buffer Objects
data BufferAccess Source
data MappingFailure Source
withMappedBuffer :: BufferTarget -> BufferAccess -> (Ptr a -> IO b) -> (MappingFailure -> IO b) -> IO b Source
Convenience function for an exception-safe combination of mapBuffer
and
unmapBuffer
.
mapBuffer :: BufferTarget -> BufferAccess -> IO (Maybe (Ptr a)) Source
unmapBuffer :: BufferTarget -> IO Bool Source
data MapBufferUsage Source
type Length = GLsizeiptr Source
mapBufferRange :: BufferTarget -> Offset -> Length -> [MapBufferUsage] -> IO (Maybe (Ptr a)) Source
flushMappedBufferRange :: BufferTarget -> Offset -> Length -> IO () Source
Indexed Buffer manipulation
type BufferIndex = GLuint Source
type RangeStartIndex = GLintptr Source
type RangeSize = GLsizeiptr Source
type BufferRange = (BufferObject, RangeStartIndex, RangeSize) Source