#include <PoolUniformBuffer.hpp>
◆ PoolUniformBuffer()
C3D_API castor3d::PoolUniformBuffer::PoolUniformBuffer |
( |
RenderSystem const & | renderSystem, |
|
|
VkBufferUsageFlags | usage, |
|
|
VkMemoryPropertyFlags | flags, |
|
|
castor::String | debugName, |
|
|
ashes::QueueShare | sharingMode = {} ) |
Constructor.
- Parameters
-
[in] | renderSystem | The RenderSystem. |
[in] | usage | The buffer usage flags. |
[in] | flags | The buffer memory flags. |
[in] | debugName | The buffer debug name. |
[in] | sharingMode | The sharing mode. |
◆ allocate()
C3D_API MemChunk castor3d::PoolUniformBuffer::allocate |
( |
VkDeviceSize | size | ) |
|
Allocates a memory chunk for a CPU buffer.
- Parameters
-
- Returns
- The memory chunk offset.
◆ cleanup()
Cleans up the GPU buffer.
- Parameters
-
[in] | device | The GPU device. |
◆ deallocate()
C3D_API void castor3d::PoolUniformBuffer::deallocate |
( |
VkDeviceSize | offset | ) |
|
|
noexcept |
Deallocates memory.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ flush()
C3D_API void castor3d::PoolUniformBuffer::flush |
( |
| ) |
|
Makes current local modifications available in VRAM.
◆ getAlignedSize() [1/2]
uint32_t castor3d::PoolUniformBuffer::getAlignedSize |
( |
| ) |
const |
|
inlinenoexcept |
◆ getAlignedSize() [2/2]
uint32_t castor3d::PoolUniformBuffer::getAlignedSize |
( |
uint32_t | size | ) |
const |
|
inlinenoexcept |
◆ getBuffer() [1/2]
ashes::UniformBuffer const & castor3d::PoolUniformBuffer::getBuffer |
( |
| ) |
const |
|
inlinenoexcept |
◆ getBuffer() [2/2]
ashes::UniformBuffer & castor3d::PoolUniformBuffer::getBuffer |
( |
| ) |
|
|
inlinenoexcept |
- Returns
- The internal buffer.
◆ getData() [1/2]
template<typename DataT >
DataT const & castor3d::PoolUniformBuffer::getData |
( |
VkDeviceSize | offset | ) |
const |
|
inlinenoexcept |
◆ getData() [2/2]
template<typename DataT >
DataT & castor3d::PoolUniformBuffer::getData |
( |
VkDeviceSize | offset | ) |
|
|
inlinenoexcept |
- Returns
- The N-th instance of the data.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ getDatas() [1/2]
castor::ByteArrayView const & castor3d::PoolUniformBuffer::getDatas |
( |
| ) |
const |
|
inlinenoexcept |
◆ getDatas() [2/2]
castor::ByteArrayView & castor3d::PoolUniformBuffer::getDatas |
( |
| ) |
|
|
inlinenoexcept |
◆ getElementSize()
uint32_t castor3d::PoolUniformBuffer::getElementSize |
( |
| ) |
const |
|
inlinenoexcept |
◆ hasAllocated()
C3D_API bool castor3d::PoolUniformBuffer::hasAllocated |
( |
| ) |
const |
|
noexcept |
- Returns
true
if at least one element has been allocated.
◆ hasAvailable()
C3D_API bool castor3d::PoolUniformBuffer::hasAvailable |
( |
VkDeviceSize | size | ) |
const |
|
noexcept |
- Parameters
-
- Returns
true
if there is enough remaining memory for a new element.
◆ hasBuffer()
bool castor3d::PoolUniformBuffer::hasBuffer |
( |
| ) |
const |
|
inlinenoexcept |
◆ initialise()
Initialises the GPU buffer.
- Parameters
-
[in] | device | The GPU device. |
The documentation for this class was generated from the following file: