struct Gloop::Buffer::TargetMap
- Gloop::Buffer::TargetMap
- Struct
- Value
- Object
Overview
Reference to a buffer mapping via a binding target.
Included Modules
- Gloop::Contextual
- Gloop::Parameters
Defined in:
gloop/buffer/target_map.crConstructors
-
.new(context : Context, target : Target)
Creates the mapping reference.
Instance Method Summary
-
#access : Gloop::Buffer::Access
Retrieves the access policy previously set when
Buffer#maporBindTarget#mapwas called. -
#access_mask : Gloop::Buffer::AccessMask
Retrieves the access mask previously used when
Buffer#maporBindTarget#mapwas called with a subset. -
#offset : Int64
When the buffer is mapped, gives the offset (in bytes) of the mapped region.
-
#size : Int64
When the buffer is mapped, gives the number of bytes mapped.
-
#to_slice : Bytes
Retrieves the bytes referring to the mapped data.
-
#to_unsafe
Retrieves a pointer to the start of the mapped data.
Constructor Detail
Instance Method Detail
Retrieves the access policy previously set when Buffer#map or BindTarget#map was called.
See: Map#access
- OpenGL function:
glGetBufferParameteriv - OpenGL enum:
GL_BUFFER_ACCESS - OpenGL version: 2.0
Retrieves the access mask previously used when Buffer#map or BindTarget#map was called with a subset.
See: Map#access_mask
- OpenGL function:
glGetBufferParameteriv - OpenGL enum:
GL_BUFFER_ACCESS_FLAGS - OpenGL version: 2.0
When the buffer is mapped, gives the offset (in bytes) of the mapped region.
See: Map#offset
- OpenGL function:
glGetBufferParameteri64v - OpenGL enum:
GL_BUFFER_MAP_OFFSET - OpenGL version: 3.2
When the buffer is mapped, gives the number of bytes mapped.
See: Map#size
- OpenGL function:
glGetBufferParameteri64v - OpenGL enum:
GL_BUFFER_MAP_LENGTH - OpenGL version: 3.2
Retrieves a pointer to the start of the mapped data.
See: Map#to_unsafe
- OpenGL function:
glGetBufferPointerv - OpenGL enum:
GL_BUFFER_MAP_POINTER - OpenGL version: 2.0