#include <kanzi/core.ui/platform/graphics_backend/gl/gpu_buffer.hpp>
◆ Type
Enumerator |
---|
BufferTypeVertex | |
BufferTypeIndex | |
◆ GPUBuffer() [1/4]
kanzi::GPUBuffer::GPUBuffer |
( |
| ) |
|
|
explicitdefault |
◆ GPUBuffer() [2/4]
kanzi::GPUBuffer::GPUBuffer |
( |
Renderer & |
renderer, |
|
|
Type |
type, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Constructor that initializes as empty and without uploading.
- Parameters
-
renderer | The renderer to be used. |
type | Type of buffer; VBO or IBO |
size | Initial size in bytes. |
◆ GPUBuffer() [3/4]
Constructor that initializes with data and uploads immediately.
- Parameters
-
renderer | The renderer to be used. |
type | Type of buffer; VBO or IBO |
data | Initial data to upload. |
◆ GPUBuffer() [4/4]
kanzi::GPUBuffer::GPUBuffer |
( |
GPUBuffer && |
other | ) |
|
|
inline |
◆ getNativeHandle()
unsigned int kanzi::GPUBuffer::getNativeHandle |
( |
| ) |
const |
|
inline |
Get the underlying native GL name.
- Returns
- Buffer's native GL name.
◆ getSize()
size_t kanzi::GPUBuffer::getSize |
( |
| ) |
const |
|
inline |
Get the size of the buffer.
- Returns
- Size of the buffer.
◆ getType()
Type kanzi::GPUBuffer::getType |
( |
| ) |
const |
|
inline |
Get the type of the buffer.
- Returns
- Type of the buffer.
◆ setSubData()
Update a subsection of data in the buffer.
Uploads changes immediately.
- Parameters
-
renderer | Pointer to the renderer being used. |
data | The new data. |
offset | Offset in the buffer to update the data into. |
◆ setData()
Update all data in the buffer.
Uploads changes immediately.
- Parameters
-
renderer | Pointer to the renderer being used. |
data | The new data. |
shrinkToFit | Whether to allow the buffer to shrink, if the data size is smaller than the buffer size. |
◆ operator=()
◆ swap
The documentation for this class was generated from the following file: