aboutsummaryrefslogtreecommitdiffstats
path: root/include/vk-api.hpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-01-27 22:28:53 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-01-27 22:28:53 +0100
commite4180902265c36744a770e932bb0a3f204d58b28 (patch)
treef695fba6fc88277bf999c5dcdf47b3a79e13bbf4 /include/vk-api.hpp
parent1314f696a7861f3b1509c7f5c27d6b06bc22d5f1 (diff)
Convert buffer creation function to an api one
Diffstat (limited to 'include/vk-api.hpp')
-rw-r--r--include/vk-api.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/vk-api.hpp b/include/vk-api.hpp
new file mode 100644
index 0000000..690b91f
--- /dev/null
+++ b/include/vk-api.hpp
@@ -0,0 +1,25 @@
+#ifndef __VK_API_HPP_
+#define __VK_API_HPP_
+
+#include "vk-context.hpp"
+
+struct Buffer {
+ VmaAllocation alloc;
+ VkBuffer vkbuffer;
+ void* mapped_ptr;
+};
+
+class vkapi {
+ public:
+ vkapi() = default;
+
+ Buffer create_buffer(size_t data_size, VkBufferUsageFlags buffer_usage, VmaMemoryUsage mem_usage);
+ void destroy_buffer(Buffer& buffer);
+
+ // private:
+
+ vkcontext context;
+
+};
+
+#endif // !__VK_API_HPP_