Hymn to Beauty
C++ 3D Engine
Video::VulkanBufferAllocator Class Reference

Vulkan implementation of BufferAllocator. More...

#include <VulkanBufferAllocator.hpp>

Inheritance diagram for Video::VulkanBufferAllocator:
Video::BufferAllocator

Public Member Functions

 VulkanBufferAllocator (VulkanRenderer &vulkanRenderer, VkDevice device, VkPhysicalDevice physicalDevice, uint32_t frames, uint32_t nonCoherentAtomSize)
 Create a new buffer allocator. More...
 
 ~VulkanBufferAllocator () final
 Destructor. More...
 
- Public Member Functions inherited from Video::BufferAllocator
 BufferAllocator (uint32_t frames)
 Create a new buffer allocator. More...
 
virtual ~BufferAllocator ()
 Destructor. More...
 
void BeginFrame ()
 Call at the beginning of each frame. More...
 
BufferCreateBuffer (Buffer::BufferUsage bufferUsage, uint32_t size, const void *data)
 Create a GPU buffer. More...
 
BufferCreateTemporaryBuffer (Buffer::BufferUsage bufferUsage, uint32_t size, const void *data)
 Create a temporary GPU buffer. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from Video::BufferAllocator
static const uint32_t poolSize = 1024 * 1024
 The size of each buffer in the pool. More...
 

Detailed Description

Vulkan implementation of BufferAllocator.

Constructor & Destructor Documentation

◆ VulkanBufferAllocator()

Video::VulkanBufferAllocator::VulkanBufferAllocator ( VulkanRenderer vulkanRenderer,
VkDevice  device,
VkPhysicalDevice  physicalDevice,
uint32_t  frames,
uint32_t  nonCoherentAtomSize 
)

Create a new buffer allocator.

Parameters
vulkanRendererThe Vulkan renderer.
deviceThe Vulkan device.
physicalDeviceThe physical device.
framesHow many frames before re-using buffers.
nonCoherentAtomSizeThe size and alignment in bytes that bounds concurrent access to host-mapped device memory.

◆ ~VulkanBufferAllocator()

Video::VulkanBufferAllocator::~VulkanBufferAllocator ( )
final

Destructor.


The documentation for this class was generated from the following files: