struct Gloop::Buffer::Map

Overview

Reference to a buffer mapping.

Included Modules

Defined in:

gloop/buffer/map.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(context : Context, name : Name) #

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: TargetMap#access

  • OpenGL function: glGetNamedBufferParameteriv
  • OpenGL enum: GL_BUFFER_ACCESS
  • OpenGL version: 4.5

[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: TargetMap#access_flags

  • OpenGL function: glGetNamedBufferParameteriv
  • OpenGL enum: GL_BUFFER_ACCESS_FLAGS
  • OpenGL version: 4.5

[View source]
def offset : Int64 #

When the buffer is mapped, gives the offset (in bytes) of the mapped region.

See: TargetMap#offset

  • OpenGL function: glGetNamedBufferParameteri64v
  • OpenGL enum: GL_BUFFER_MAP_OFFSET
  • OpenGL version: 4.5

def size : Int64 #

When the buffer is mapped, gives the number of bytes mapped.

See: TargetMap#size

  • OpenGL function: glGetNamedBufferParameteri64v
  • OpenGL enum: GL_BUFFER_MAP_LENGTH
  • OpenGL version: 4.5

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: TargetMap#to_unsafe

  • OpenGL function: glGetNamedBufferPointerv
  • OpenGL enum: GL_BUFFER_MAP_POINTER
  • OpenGL version: 4.5

[View source]