#include <PoolUniformBuffer.hpp>
◆ PoolUniformBuffer()
C3D_API castor3d::PoolUniformBuffer::PoolUniformBuffer |
( |
RenderSystem const & |
renderSystem, |
|
|
castor::ArrayView< uint8_t > |
data, |
|
|
VkBufferUsageFlags |
usage, |
|
|
VkMemoryPropertyFlags |
flags, |
|
|
castor::String |
debugName, |
|
|
ashes::QueueShare |
sharingMode = {} |
|
) |
| |
Constructor.
- Parameters
-
[in] | renderSystem | The RenderSystem. |
[in] | data | The mapped data. |
[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 | ) |
|
Deallocates memory.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ getAlignedSize() [1/2]
uint32_t castor3d::PoolUniformBuffer::getAlignedSize |
( |
| ) |
const |
|
inline |
◆ getAlignedSize() [2/2]
uint32_t castor3d::PoolUniformBuffer::getAlignedSize |
( |
uint32_t |
size | ) |
const |
|
inline |
◆ getBuffer() [1/2]
ashes::UniformBuffer & castor3d::PoolUniformBuffer::getBuffer |
( |
| ) |
|
|
inline |
- Returns
- The internal buffer.
◆ getBuffer() [2/2]
ashes::UniformBuffer const & castor3d::PoolUniformBuffer::getBuffer |
( |
| ) |
const |
|
inline |
◆ getData() [1/2]
template<typename DataT >
DataT & castor3d::PoolUniformBuffer::getData |
( |
VkDeviceSize |
offset | ) |
|
|
inline |
- Returns
- The N-th instance of the data.
- Parameters
-
[in] | offset | The memory chunk offset. |
◆ getData() [2/2]
template<typename DataT >
DataT const & castor3d::PoolUniformBuffer::getData |
( |
VkDeviceSize |
offset | ) |
const |
|
inline |
◆ getDatas() [1/2]
castor::ArrayView< uint8_t > & castor3d::PoolUniformBuffer::getDatas |
( |
| ) |
|
|
inline |
◆ getDatas() [2/2]
castor::ArrayView< uint8_t > const & castor3d::PoolUniformBuffer::getDatas |
( |
| ) |
const |
|
inline |
◆ getElementSize()
uint32_t castor3d::PoolUniformBuffer::getElementSize |
( |
| ) |
const |
|
inline |
◆ hasAllocated()
C3D_API bool castor3d::PoolUniformBuffer::hasAllocated |
( |
| ) |
const |
- Returns
true
if at least one element has been allocated.
◆ hasAvailable()
C3D_API bool castor3d::PoolUniformBuffer::hasAvailable |
( |
VkDeviceSize |
size | ) |
const |
- Parameters
-
- Returns
true
if there is enough remaining memory for a new element.
◆ hasBuffer()
bool castor3d::PoolUniformBuffer::hasBuffer |
( |
| ) |
const |
|
inline |
◆ initialise()
Initialises the GPU buffer.
- Parameters
-
[in] | device | The GPU device. |
◆ operator ashes::UniformBuffer &()
castor3d::PoolUniformBuffer::operator ashes::UniformBuffer & |
( |
| ) |
|
|
inline |
◆ operator ashes::UniformBuffer const &()
castor3d::PoolUniformBuffer::operator ashes::UniformBuffer const & |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: