#include <GpuBufferPackedAllocator.hpp>
◆ GpuBufferPackedAllocator()
C3D_API castor3d::GpuBufferPackedAllocator::GpuBufferPackedAllocator |
( |
size_t | size, |
|
|
size_t | alignSize = 1u ) |
|
explicit |
Constructor.
- Parameters
-
[in] | size | The allocated size. |
[in] | alignSize | The alignment used for buffer chunks. |
◆ allocate()
C3D_API VkDeviceSize castor3d::GpuBufferPackedAllocator::allocate |
( |
size_t | size | ) |
|
Allocates memory.
- Parameters
-
[in] | size | The requested memory size. |
- Returns
- The memory chunk.
◆ deallocate()
C3D_API void castor3d::GpuBufferPackedAllocator::deallocate |
( |
VkDeviceSize | pointer | ) |
|
Deallocates memory.
- Parameters
-
[in] | pointer | The memory chunk. |
◆ getAlignSize()
size_t castor3d::GpuBufferPackedAllocator::getAlignSize |
( |
| ) |
const |
|
inline |
- Returns
- The alignment used for buffer chunks.
◆ getTotalSize()
size_t castor3d::GpuBufferPackedAllocator::getTotalSize |
( |
| ) |
const |
|
inline |
- Returns
- The allocator size.
◆ hasAvailable()
bool castor3d::GpuBufferPackedAllocator::hasAvailable |
( |
size_t | size | ) |
const |
|
inline |
- Returns
true
if there is enough remaining memory for given size.
The documentation for this struct was generated from the following file: