Transfer Buffer. More...
#include <transfer_buffer.h>
Public Member Functions | |
TransferBuffer () | |
Constructs a null instance. More... | |
TransferBuffer (GraphicContext &gc, int size, BufferUsage usage=BufferUsage::dynamic_copy) | |
Constructs a transfer buffer. More... | |
TransferBuffer (GraphicContext &gc, const void *data, int size, BufferUsage usage=BufferUsage::dynamic_copy) | |
Constructs a transfer buffer. More... | |
virtual | ~TransferBuffer () |
void * | get_data () |
Retrieves a pointer to the mapped buffer. More... | |
TransferBufferProvider * | get_provider () const |
Get Provider. More... | |
bool | is_null () const |
Returns true if this object is invalid. More... | |
void | lock (GraphicContext &gc, BufferAccess access) |
Maps buffer into system memory. More... | |
operator bool () const | |
bool | operator== (const TransferBuffer &other) const |
Handle comparison operator. More... | |
void | throw_if_null () const |
Throw an exception if this object is invalid. More... | |
void | unlock () |
Unmaps buffer. More... | |
void | upload_data (GraphicContext &gc, int offset, const void *data, int size) |
Uploads data to transfer buffer. More... | |
Transfer Buffer.
clan::TransferBuffer::TransferBuffer | ( | ) |
Constructs a null instance.
clan::TransferBuffer::TransferBuffer | ( | GraphicContext & | gc, |
int | size, | ||
BufferUsage | usage = BufferUsage::dynamic_copy |
||
) |
Constructs a transfer buffer.
gc | = Graphic Context |
size | = value |
usage | = Buffer Usage |
clan::TransferBuffer::TransferBuffer | ( | GraphicContext & | gc, |
const void * | data, | ||
int | size, | ||
BufferUsage | usage = BufferUsage::dynamic_copy |
||
) |
Constructs a transfer buffer.
gc | = Graphic Context |
data | = void |
size | = value |
usage | = Buffer Usage |
|
virtual |
void* clan::TransferBuffer::get_data | ( | ) |
Retrieves a pointer to the mapped buffer.
Referenced by clan::TransferVector< Type >::get_data().
TransferBufferProvider* clan::TransferBuffer::get_provider | ( | ) | const |
Get Provider.
|
inline |
Returns true if this object is invalid.
void clan::TransferBuffer::lock | ( | GraphicContext & | gc, |
BufferAccess | access | ||
) |
Maps buffer into system memory.
|
inlineexplicit |
bool clan::TransferBuffer::operator== | ( | const TransferBuffer & | other | ) | const |
Handle comparison operator.
void clan::TransferBuffer::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
void clan::TransferBuffer::unlock | ( | ) |
Unmaps buffer.
void clan::TransferBuffer::upload_data | ( | GraphicContext & | gc, |
int | offset, | ||
const void * | data, | ||
int | size | ||
) |
Uploads data to transfer buffer.
Referenced by clan::TransferVector< Type >::upload_data().