Castor3D 0.12.0
Multiplatform 3D engine
Classes | Public Member Functions | List of all members
castor3d::GpuBufferPackedAllocator Struct Reference

#include <GpuBufferPackedAllocator.hpp>

Public Member Functions

C3D_API GpuBufferPackedAllocator (size_t size)
 Constructor. More...
 
C3D_API VkDeviceSize allocate (size_t size)
 Allocates memory. More...
 
C3D_API void deallocate (VkDeviceSize pointer)
 Deallocates memory. More...
 
size_t getTotalSize () const
 
size_t getAlignSize () const
 
bool hasAvailable (size_t size) const
 

Constructor & Destructor Documentation

◆ GpuBufferPackedAllocator()

C3D_API castor3d::GpuBufferPackedAllocator::GpuBufferPackedAllocator ( size_t  size)
explicit

Constructor.

Parameters
[in]sizeThe allocated size.

Member Function Documentation

◆ allocate()

C3D_API VkDeviceSize castor3d::GpuBufferPackedAllocator::allocate ( size_t  size)

Allocates memory.

Parameters
[in]sizeThe requested memory size.
Returns
The memory chunk.

◆ deallocate()

C3D_API void castor3d::GpuBufferPackedAllocator::deallocate ( VkDeviceSize  pointer)

Deallocates memory.

Parameters
[in]pointerThe memory chunk.

◆ getAlignSize()

size_t castor3d::GpuBufferPackedAllocator::getAlignSize ( ) const
inline
Returns
The element aligned size.

◆ 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: