RenderBuffersManager class
Suballocates vertex, index and uniform data from a pool of OpenGL buffer objects.
Maintains one or more mapped (or host-backed) buffer objects per buffer type and hands out aligned sub-ranges of them to render commands through AcquireMemory(). Buffers are remapped at the start of a frame and flushed to the GPU once all commands have written their data.
Public types
- struct BufferSpecifications
- Configuration of a buffer object for a given type.
- struct Parameters
- Result of a memory request, locating a sub-range within a buffer object.
- enum class BufferTypes { Array = 0, ElementArray, Uniform, Count }
- Type of data a buffer holds.
Constructors, destructors, conversion operators
-
RenderBuffersManager(bool useBufferMapping,
std::
uint32_t vboMaxSize, std:: uint32_t iboMaxSize)
Public functions
- auto Specs(BufferTypes type) const -> const BufferSpecifications&
- Returns the specifications for a buffer of the specified type.
-
auto AcquireMemory(BufferTypes type,
std::
uint32_t bytes) -> Parameters - Requests an amount of bytes from the specified buffer type.
-
auto AcquireMemory(BufferTypes type,
std::
uint32_t bytes, std:: uint32_t alignment) -> Parameters - Requests an amount of bytes from the specified buffer type with a custom alignment requirement.
Enum documentation
enum class nCine:: RenderBuffersManager:: BufferTypes
Type of data a buffer holds.
| Enumerators | |
|---|---|
| Array |
Vertex buffer object |
| ElementArray |
Index (element array) buffer object |
| Uniform |
Uniform buffer object |
| Count |
Number of buffer types |