Storage Buffer. More...
#include <storage_buffer.h>
 Inheritance diagram for clan::StorageBuffer:
 Inheritance diagram for clan::StorageBuffer:| Public Member Functions | |
| StorageBuffer () | |
| Constructs a null instance. | |
| StorageBuffer (GraphicContext &gc, const void *data, int size, int stride, BufferUsage usage=BufferUsage::dynamic_draw) | |
| Constructs a buffer. | |
| StorageBuffer (GraphicContext &gc, int size, int stride, BufferUsage usage=BufferUsage::dynamic_draw) | |
| Constructs a buffer. | |
| 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. | |
| StorageBufferProvider * | get_provider () const | 
| Get Provider. | |
| bool | is_null () const | 
| Returns true if this object is invalid. | |
| operator bool () const | |
| bool | operator== (const StorageBuffer &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 storage buffer. | |
Storage Buffer.
| clan::StorageBuffer::StorageBuffer | ( | ) | 
Constructs a null instance.
| clan::StorageBuffer::StorageBuffer | ( | GraphicContext & | gc, | 
| int | size, | ||
| int | stride, | ||
| BufferUsage | usage = BufferUsage::dynamic_draw ) | 
Constructs a buffer.
| gc | = Graphic Context | 
| size | = size - use ProgramObject::get_storage_buffer_size() to calcuate this | 
| usage | = Buffer Usage | 
| clan::StorageBuffer::StorageBuffer | ( | GraphicContext & | gc, | 
| const void * | data, | ||
| int | size, | ||
| int | stride, | ||
| BufferUsage | usage = BufferUsage::dynamic_draw ) | 
Constructs a buffer.
| gc | = Graphic Context | 
| data | = void | 
| size | = value | 
| usage | = Buffer Usage | 
| void clan::StorageBuffer::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::StorageVector< Type >::copy_from().
| void clan::StorageBuffer::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::StorageVector< Type >::copy_to().
| StorageBufferProvider * clan::StorageBuffer::get_provider | ( | ) | const | 
Get Provider.
| 
 | inline | 
Returns true if this object is invalid.
| 
 | inlineexplicit | 
| bool clan::StorageBuffer::operator== | ( | const StorageBuffer & | other | ) | const | 
Handle comparison operator.
| void clan::StorageBuffer::throw_if_null | ( | ) | const | 
Throw an exception if this object is invalid.
| void clan::StorageBuffer::upload_data | ( | GraphicContext & | gc, | 
| const void * | data, | ||
| int | size ) | 
Uploads data to storage buffer.
The size specified must match the size of the buffer and is only included to help guard against buffer overruns.
Referenced by clan::StorageVector< Type >::upload_data(), and clan::StorageVector< Type >::upload_data().