GLBuffer

OpenGL Buffer wrapper.

Constructors

this
this(OpenGL gl, GLuint target, GLuint usage)

Creates an empty buffer.

this
this(OpenGL gl, GLuint target, GLuint 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.

close
deprecated void close()
Undocumented in source. Be warned that the author may not have intended to support it.
getBytes
ubyte[] getBytes()

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

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

Gets a sub-part of a buffer.

handle
GLuint handle()
setData
void setData(T[] buffer)
setData
void setData(size_t size, void* data)
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.

unbind
void unbind()

Unbinds this buffer.

Properties

size
size_t size [@property getter]

Meta