struct Gloop::Buffer::TargetMap

Overview

Reference to a buffer mapping via a binding target.

Included Modules

Defined in:

gloop/buffer/target_map.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(context : Context, target : Target) #

Creates the mapping reference.


[View source]

Instance Method Detail

def access : Gloop::Buffer::Access #

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

[View source]
def access_mask : Gloop::Buffer::AccessMask #

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

[View source]
def offset : Int64 #

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

def size : Int64 #

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

def to_slice : Bytes #

Retrieves the bytes referring to the mapped data.


[View source]
def to_unsafe #

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

[View source]