GLBuffer

OpenGL Buffer.

Constructors

this
this(uint target, uint usage)

Creates an empty buffer.

this
this(uint target, uint usage, T[] buffer)

Creates a buffer already filled with data.

Destructor

~this
~this()

Releases the OpenGL buffer resource.

Members

Functions

bind
void bind()

Binds this buffer.

bytes
ubyte[] bytes()

Gets the whole buffer content in a newly allocated array. <b>This is intended for debugging purposes.</b>

data
void data(T[] buffer)

Returns the copy bytes to the buffer.

getSubData
void getSubData(size_t offset, size_t size, void* data)

Gets a sub-part of a buffer.

handle
uint handle()
setData
void setData(size_t size, void* data)

Returns the copy bytes to the buffer.

setSubData
void setSubData(size_t offset, size_t size, void* data)

Copies bytes to a sub-part of the buffer. You can't adress data beyond the buffer's size.

size
size_t size()

Returns the size of the buffer in bytes.

unbind
void unbind()

Unbinds this buffer.

Inherited Members

From VideoBuffer

_buffer
uint _buffer;
Undocumented in source.
_size
size_t _size;
Undocumented in source.
_target
uint _target;
Undocumented in source.
_usage
uint _usage;
Undocumented in source.
_firstLoad
bool _firstLoad;
Undocumented in source.
_initialized
bool _initialized;
Undocumented in source.
size
size_t size()
data
void data(T[] buffer)
setData
void setData(size_t size, void* data)
setSubData
void setSubData(size_t offset, size_t size, void* data)
getSubData
void getSubData(size_t offset, size_t size, void* data)
bytes
ubyte[] bytes()
bind
void bind()
unbind
void unbind()
handle
uint handle()

Meta