Element Array Buffer. More...
#include <element_array_buffer.h>
Public Member Functions | |
ElementArrayBuffer () | |
Constructs a null instance. | |
ElementArrayBuffer (GraphicContext &gc, const void *data, int size, BufferUsage usage=BufferUsage::static_draw) | |
Constructs a ElementArrayBuffer. | |
ElementArrayBuffer (GraphicContext &gc, int size, BufferUsage usage=BufferUsage::static_draw) | |
Constructs a ElementArrayBuffer. | |
virtual | ~ElementArrayBuffer () |
void | copy_from (GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1) |
Copies data from transfer buffer. | |
void | copy_to (GraphicContext &gc, TransferBuffer &buffer, int dest_pos=0, int src_pos=0, int size=-1) |
Copies data to transfer buffer. | |
ElementArrayBufferProvider * | get_provider () const |
Get Provider. | |
bool | is_null () const |
Returns true if this object is invalid. | |
operator bool () const | |
bool | operator== (const ElementArrayBuffer &other) const |
Handle comparison operator. | |
void | throw_if_null () const |
Throw an exception if this object is invalid. | |
void | upload_data (GraphicContext &gc, const void *data, int size) |
Uploads data to element array buffer. | |
Element Array Buffer.
clan::ElementArrayBuffer::ElementArrayBuffer | ( | ) |
Constructs a null instance.
Referenced by clan::ElementArrayVector< Type >::ElementArrayVector(), clan::ElementArrayVector< Type >::ElementArrayVector(), clan::ElementArrayVector< Type >::ElementArrayVector(), and operator==().
clan::ElementArrayBuffer::ElementArrayBuffer | ( | GraphicContext & | gc, |
int | size, | ||
BufferUsage | usage = BufferUsage::static_draw ) |
Constructs a ElementArrayBuffer.
gc | = Graphic Context |
size | = value |
usage | = Buffer Usage |
References clan::static_draw.
clan::ElementArrayBuffer::ElementArrayBuffer | ( | GraphicContext & | gc, |
const void * | data, | ||
int | size, | ||
BufferUsage | usage = BufferUsage::static_draw ) |
Constructs a ElementArrayBuffer.
gc | = Graphic Context |
data | = void |
size | = value |
usage | = Buffer Usage |
References clan::static_draw.
|
virtual |
void clan::ElementArrayBuffer::copy_from | ( | GraphicContext & | gc, |
TransferBuffer & | buffer, | ||
int | dest_pos = 0, | ||
int | src_pos = 0, | ||
int | size = -1 ) |
Copies data from transfer buffer.
Referenced by clan::ElementArrayVector< Type >::copy_from().
void clan::ElementArrayBuffer::copy_to | ( | GraphicContext & | gc, |
TransferBuffer & | buffer, | ||
int | dest_pos = 0, | ||
int | src_pos = 0, | ||
int | size = -1 ) |
Copies data to transfer buffer.
Referenced by clan::ElementArrayVector< Type >::copy_to().
ElementArrayBufferProvider * clan::ElementArrayBuffer::get_provider | ( | ) | const |
Get Provider.
|
inline |
Returns true if this object is invalid.
|
inlineexplicit |
bool clan::ElementArrayBuffer::operator== | ( | const ElementArrayBuffer & | other | ) | const |
Handle comparison operator.
References ElementArrayBuffer().
void clan::ElementArrayBuffer::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
void clan::ElementArrayBuffer::upload_data | ( | GraphicContext & | gc, |
const void * | data, | ||
int | size ) |
Uploads data to element array buffer.
The size specified must match the size of the buffer and is only included to help guard against buffer overruns.
Referenced by clan::ElementArrayVector< Type >::upload_data(), and clan::ElementArrayVector< Type >::upload_data().