Castor3D 0.16.0
Multiplatform 3D engine
|
A GPU buffer pool, that uses an allocator to allocate sub-buffers. More...
#include <GpuBuffer.hpp>
Public Member Functions | |
GpuBaseBufferT (RenderDevice const &device, VkBufferUsageFlags usage, VkMemoryPropertyFlags memoryFlags, castor::String const &debugName, ashes::QueueShare sharingMode, AllocatorT allocator) | |
Constructor. | |
bool | hasAvailable (VkDeviceSize size) const noexcept |
MemChunk | allocate (VkDeviceSize size) noexcept |
Allocates a memory chunk for a CPU buffer. | |
void | deallocate (MemChunk const &mem) noexcept |
Deallocates memory. | |
size_t | getMinAlignment () const noexcept |
ashes::BufferBase const & | getBuffer () const noexcept |
ashes::BufferBase & | getBuffer () noexcept |
A GPU buffer pool, that uses an allocator to allocate sub-buffers.
castor3d::GpuBaseBufferT< AllocatorT >::GpuBaseBufferT | ( | RenderDevice const & | device, |
VkBufferUsageFlags | usage, | ||
VkMemoryPropertyFlags | memoryFlags, | ||
castor::String const & | debugName, | ||
ashes::QueueShare | sharingMode, | ||
AllocatorT | allocator ) |
Constructor.
[in] | device | The device on which the storage is allocated. |
[in] | usage | The buffer targets. |
[in] | memoryFlags | The buffer memory properties. |
[in] | debugName | The debug name. |
[in] | sharingMode | The sharing mode. |
[in] | allocator | The allocator. |
|
noexcept |
Allocates a memory chunk for a CPU buffer.
[in] | size | The requested memory size. |
|
noexcept |
Deallocates memory.
[in] | mem | The memory chunk. |
|
inlinenoexcept |
Referenced by castor3d::ObjectBufferOffset::GpuBufferChunk::getBuffer().
|
inlinenoexcept |
|
noexcept |
|
noexcept |
[in] | size | The requested memory size. |
true
if there is enough remaining memory for given size.