|
| vertex_buffer (VertexBufferType _type=VBT_VERTICES, VertexBufferUsage _usage=VBU_STATIC_DRAW) |
| construct from description of component format, where the default format specifies a color buffer with alpha channel
|
|
| ~vertex_buffer () |
| calls the destruct method if necessary
|
|
void | bind (context &ctx, VertexBufferType _type=VBT_UNDEF) const |
| bind buffer potentially overwriting buffer type
|
|
bool | create (const context &ctx, size_t size_in_bytes) |
| create empty vertex buffer of size size given in bytes
|
|
template<typename T > |
bool | create (const context &ctx, const T &array) |
| create vertex buffer and copy data from CPU array array into buffer memory
|
|
template<typename T > |
bool | create (const context &ctx, const T *array_ptr, size_t nr_elements) |
| create vertex buffer and copy data from CPU array array_ptr into buffer memory
|
|
bool | is_created () const |
| check whether the vertex buffer has been created
|
|
size_t | get_size_in_bytes () const |
| return size in bytes
|
|
template<typename T > |
bool | replace (const context &ctx, size_t buffer_offset_in_bytes, const T *array_ptr, size_t nr_elements) |
| replace part (starting at byte offset buffer_offset_in_bytes ) or whole vertex buffer content from nr_elements of CPU array array_ptr
|
|
bool | copy (const context &ctx, size_t src_offset_in_bytes, size_t size_in_bytes, vertex_buffer &dst, size_t dst_offset_in_bytes) const |
| copy size_in_bytes number bytes from this vertex buffer starting at byte offset start_offset_in_bytes to vertex buffer dst starting at offest dst_offset_in_bytes
|
|
template<typename T > |
bool | copy (const context &ctx, size_t src_offset_in_bytes, T *array_ptr, size_t nr_elements) |
| copy nr_elements array elements from vertex buffer starting at byte offset start_offset_in_bytes to CPU array array_ptr
|
|
void | destruct (const context &ctx) |
| destruct the render buffer
|
|
void | put_id_void (void *ptr) const |
|
template<typename T > |
void | put_id (T &id) const |
| cast the refence to rendering api specific representation of component id to the specified type
|
|
a vertex buffer is an unstructured memory block on the GPU.