Responsible for allocating buffers.
More...
#include <BufferAllocator.hpp>
|
| static const uint32_t | poolSize = 1024 * 1024 |
| | The size of each buffer in the pool. More...
|
| |
Responsible for allocating buffers.
◆ BufferAllocator()
| Video::BufferAllocator::BufferAllocator |
( |
uint32_t |
frames | ) |
|
|
explicit |
Create a new buffer allocator.
- Parameters
-
| frames | How many frames before re-using buffers. |
◆ ~BufferAllocator()
| Video::BufferAllocator::~BufferAllocator |
( |
| ) |
|
|
virtual |
◆ BeginFrame()
| void Video::BufferAllocator::BeginFrame |
( |
| ) |
|
Call at the beginning of each frame.
◆ CreateBuffer()
Create a GPU buffer.
- Parameters
-
| bufferUsage | How the buffer will be used. |
| size | The size of the buffer in bytes. |
| data | Data to upload to the buffer. Can be nullptr if no data should be uploaded. |
- Returns
- The created buffer.
◆ CreateTemporaryBuffer()
Create a temporary GPU buffer.
- Parameters
-
| bufferUsage | How the buffer will be used. |
| size | The size of the buffer in bytes. |
| data | Data to upload to the buffer. Can be nullptr if no data should be uploaded. |
- Returns
- The created buffer.
◆ poolSize
| const uint32_t Video::BufferAllocator::poolSize = 1024 * 1024 |
|
staticprotected |
The size of each buffer in the pool.
The documentation for this class was generated from the following files: