|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Vulkan GPU buffer wrapper implementing the Buffer interface. More...
#include <C:/Code/AeonEngine/engine/renderers/vulkan/VulkanBuffer.hpp>


Public Member Functions | |
| VulkanBuffer (const VulkanRenderer &aVulkanRenderer) | |
| Construct an uninitialized buffer. | |
| VulkanBuffer (const VulkanRenderer &aVulkanRenderer, const VkDeviceSize aSize, const VkBufferUsageFlags aUsage, const VkMemoryPropertyFlags aProperties, const void *aData=nullptr) | |
| Construct and initialize a buffer with the given parameters. | |
| VulkanBuffer (VulkanBuffer &&) | |
| Move Constructor. | |
| VulkanBuffer (const VulkanBuffer &aBuffer)=delete | |
| Copy constructor. | |
| VulkanBuffer & | operator= (const VulkanBuffer &aBuffer)=delete |
| Assignment operator due to rule of zero/three/five. | |
| VulkanBuffer & | operator= (VulkanBuffer &&)=delete |
| Move Assignment. | |
| void | Initialize (const VkDeviceSize aSize, const VkBufferUsageFlags aUsage, const VkMemoryPropertyFlags aProperties, const void *aData=nullptr) |
| Initialize the buffer with the given size, usage, memory properties, and optional data. | |
| void | Finalize () |
| Release the Vulkan buffer and its device memory. | |
| const VkBuffer & | GetBuffer () const |
| Get the underlying Vulkan buffer handle. | |
Virtual functions | |
| void | WriteMemory (const size_t aOffset, const size_t aSize, const void *aData=nullptr) const final |
| Write data into the buffer at a given offset. | |
| void * | Map (const size_t aOffset, size_t aSize) const final |
| Map a region of the buffer into CPU-accessible memory. | |
| void | Unmap () const final |
| Unmap a previously mapped buffer region. | |
| size_t | GetSize () const final |
| Get the total size of the buffer in bytes. | |
Vulkan GPU buffer wrapper implementing the Buffer interface.
Definition at line 25 of file VulkanBuffer.hpp.
| AeonGames::VulkanBuffer::VulkanBuffer | ( | const VulkanRenderer & | aVulkanRenderer | ) |
Construct an uninitialized buffer.
Definition at line 28 of file VulkanBuffer.cpp.
| AeonGames::VulkanBuffer::VulkanBuffer | ( | const VulkanRenderer & | aVulkanRenderer, |
| const VkDeviceSize | aSize, | ||
| const VkBufferUsageFlags | aUsage, | ||
| const VkMemoryPropertyFlags | aProperties, | ||
| const void * | aData = nullptr ) |
Construct and initialize a buffer with the given parameters.
Definition at line 32 of file VulkanBuffer.cpp.
| AeonGames::VulkanBuffer::VulkanBuffer | ( | VulkanBuffer && | aBuffer | ) |
Move Constructor.
Definition at line 54 of file VulkanBuffer.cpp.
| AeonGames::VulkanBuffer::~VulkanBuffer | ( | ) |
Definition at line 49 of file VulkanBuffer.cpp.
| void AeonGames::VulkanBuffer::Finalize | ( | ) |
Release the Vulkan buffer and its device memory.
Definition at line 190 of file VulkanBuffer.cpp.
| const VkBuffer & AeonGames::VulkanBuffer::GetBuffer | ( | ) | const |
Get the underlying Vulkan buffer handle.
Definition at line 77 of file VulkanBuffer.cpp.
|
finalvirtual |
Get the total size of the buffer in bytes.
Implements AeonGames::Buffer.
Definition at line 131 of file VulkanBuffer.cpp.
| void AeonGames::VulkanBuffer::Initialize | ( | const VkDeviceSize | aSize, |
| const VkBufferUsageFlags | aUsage, | ||
| const VkMemoryPropertyFlags | aProperties, | ||
| const void * | aData = nullptr ) |
Initialize the buffer with the given size, usage, memory properties, and optional data.
Definition at line 64 of file VulkanBuffer.cpp.
|
finalvirtual |
Map a region of the buffer into CPU-accessible memory.
| aOffset | Byte offset of the region to map. |
| aSize | Number of bytes to map. |
Implements AeonGames::Buffer.
Definition at line 105 of file VulkanBuffer.cpp.
|
finalvirtual |
Unmap a previously mapped buffer region.
Implements AeonGames::Buffer.
Definition at line 126 of file VulkanBuffer.cpp.
|
finalvirtual |
Write data into the buffer at a given offset.
| aOffset | Byte offset into the buffer to begin writing. |
| aSize | Number of bytes to write. |
| aData | Pointer to the source data, or nullptr to clear. |
Implements AeonGames::Buffer.
Definition at line 82 of file VulkanBuffer.cpp.