ElementBuffer

Represents an OpenGL element buffer. The constructor must be used to avoid segmentation faults.

Constructors

this
this()

Initializes the buffer.

this
this(T data, GLenum hint)
this(T ptr, size_t size, GLenum hint)

Initualizes the buffer and sets data.

Destructor

~this
~this()
Undocumented in source.

Alias This

buffer

Alias this to buffer.

Members

Functions

bind
void bind()

Binds the buffer.

remove
void remove()

Deletes the buffer.

set_data
void set_data(T data, GLenum hint)
void set_data(T ptr, size_t size, GLenum hint)

Uploads data to the GPU.

unbind
void unbind()

Unbinds the buffer.

update
void update(T data, GLintptr offset)
void update(T ptr, size_t size, GLintptr offset)

Updates the Buffer, using glBufferSubData.

Variables

buffer
GLuint buffer;

The OpenGL buffer name.

hint
GLenum hint;

Specifies the expected usage pattern of the data store.

length
size_t length;

Length of the passed data, note it's the length of a void[] array.

Inherited Members

From IBuffer

bind
void bind()
Undocumented in source.
unbind
void unbind()
Undocumented in source.
set_data
void set_data(T data, GLenum hint)
Undocumented in source.
update
void update(T data, GLintptr offset)
Undocumented in source.
update
void update(T ptr, size_t size, GLintptr offset)
Undocumented in source.

Meta