#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 |
|
) |
| |
|
inlineexplicit |
Constructor that initializes as empty and without uploading.
- Parameters
-
| renderer | The renderer to use. |
| 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 use. |
| type | Type of buffer: VBO or IBO. |
| data | Initial data to upload. |
◆ GPUBuffer() [4/4]
| kanzi::GPUBuffer::GPUBuffer |
( |
GPUBuffer && |
other | ) |
|
|
inline |
Move constructor.
- Parameters
-
◆ getNativeHandle()
| unsigned int kanzi::GPUBuffer::getNativeHandle |
( |
| ) |
const |
|
inline |
Gets the underlying native GL name.
- Returns
- The native GL name of the buffer.
◆ getSize()
| size_t kanzi::GPUBuffer::getSize |
( |
| ) |
const |
|
inline |
Gets the size of the buffer.
- Returns
- Size of the buffer.
◆ getType()
| Type kanzi::GPUBuffer::getType |
( |
| ) |
const |
|
inline |
Gets the type of the buffer.
- Returns
- Type of the buffer.
◆ setSubData()
Updates 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 into which to update the data. |
◆ setData()
Updates 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=()
Move operator.
- Parameters
-
- Returns
- This object.
◆ swap
Swaps buffer contents with each other.
- Parameters
-
| lhs | Left-hand side operand. |
| rhs | Right-hand side operand. |
The documentation for this class was generated from the following file: