caramia-0.2.0.1: Less painful OpenGL 3.3 rendering

Safe HaskellNone
LanguageHaskell2010

Graphics.Caramia.Buffer.Internal

Synopsis

Documentation

data Buffer Source

Buffer data type.

Constructors

Buffer 

Fields

resource :: !(Resource Buffer_)
 
status :: !(IORef BufferStatus)
 
viewAllowedMappings :: !AccessFlags

Returns the allowed mappings.

viewSize :: !Int

Returns the size of the buffer, in bytes.

ordIndex :: !Int
 

Instances

data BufferStatus Source

Constructors

BufferStatus 

Fields

mapped :: !Bool
 

newtype Buffer_ Source

Constructors

Buffer_ GLuint 

data AccessFlags Source

Describes a style of mapping.

Constructors

ReadAccess

The mapping can be read from.

WriteAccess

The mapping can be written to.

ReadWriteAccess

Both reading and writing can be done.

NoAccess

No access; you cannot map the buffer at all after creation.

data MapFlag Source

Additional mapping flags.

Constructors

UnSynchronized

Map the buffer without synchronization. You will have to use synchronization primitives to make sure you and OpenGL won't be using the buffer at the same time.