VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
Buffer.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <venom/vulkan/Debug.h>
11
12
13namespace venom
14{
15namespace vulkan
16{
17class Buffer
18{
19public:
20 Buffer();
21 ~Buffer();
22 Buffer(const Buffer&) = delete;
23 Buffer& operator=(const Buffer&) = delete;
24 Buffer(Buffer&& other);
25 Buffer& operator=(Buffer&& other);
26 static uint32_t FindMemoryType(uint32_t typeFilter, VkMemoryPropertyFlags properties);
27
28 vc::Error CreateBuffer(const VkDeviceSize size, const VkBufferUsageFlags flags, const VkSharingMode sharingMode, const VkMemoryPropertyFlags memoryProperties);
29 vc::Error WriteBuffer(const void* data);
30 VkBuffer GetVkBuffer() const;
31 const VkDeviceMemory & GetVkDeviceMemory() const;
32 VkDeviceSize GetSize() const;
33 inline const VkBuffer * GetVkBufferPtr() const { return &__buffer; }
34
35private:
36 vc::Error __BindBufferMemory();
37
38private:
39 uint32_t __size;
40 VkBuffer __buffer;
41 VkDeviceMemory __memory;
42};
43}
44}
Encapsulation of Vulkan for the front end of VenomEngine.
Definition Allocator.h:18
Contains the entirety of the code of the VenomEngine project.
Definition Callback.h:13