summaryrefslogtreecommitdiff
path: root/src/window.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.hpp')
-rw-r--r--src/window.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/window.hpp b/src/window.hpp
index de1a2ac..c96f4c0 100644
--- a/src/window.hpp
+++ b/src/window.hpp
@@ -115,4 +115,25 @@ struct PKVK_TmpBufferDetails {
void PKVK_BeginBuffer(unsigned int family_index, VkDeviceSize requestedMemorySize, PKVK_TmpBufferDetails &tmpBufferDetails, PKVK_TmpBufferFlags flags = PKVK_TmpBufferFlags_ALL);
void PKVK_EndBuffer(PKVK_TmpBufferDetails &tmpBufferDetails, PKVK_TmpBufferFlags flags = PKVK_TmpBufferFlags_ALL);
+#define PKVK_BUFFER_CREATE_DATA_ARR_MAX_LENGTH 8
+
+struct pkvk_buffer_create_data {
+ uint32_t buffer_byte_length[PKVK_BUFFER_CREATE_DATA_ARR_MAX_LENGTH];
+ void *src_data[PKVK_BUFFER_CREATE_DATA_ARR_MAX_LENGTH];
+ uint8_t n_buffers;
+ uint8_t index_index;
+ uint8_t index_instance;
+};
+struct pkvk_buffer_create_data_out {
+ VkBuffer buffers[PKVK_BUFFER_CREATE_DATA_ARR_MAX_LENGTH];
+ VkDeviceMemory device_memory_vertex;
+ VkDeviceMemory device_memory_instance;
+ VkMemoryRequirements memory_requirements_vertex;
+ VkMemoryRequirements memory_requirements_instance;
+};
+// creates vertex and instance buffers + memory + bind
+// DOES upload vertex data
+// DOES NOT upload instance data
+void pkvk_buffer_create(pkvk_buffer_create_data *data, pkvk_buffer_create_data_out *out);
+
#endif /* PKE_WINDOW_HPP */