Remove RAM stored mesh data

Remove RAM stored vertices and indices data. It is now stored only in
GPU memory.
This commit is contained in:
Piotr Krygier committed 2023-09-26 14:15:21 +02:00
1 parent 0ef475e57e
commit 940bc7e512
7 files changed
+39 -112

No files matched your search

+17 -3
View File
@@ -10,7 +10,6 @@
/**
* @brief Create buffers needed by vulkan pipeline
*
* @param vulkan_state
* @return uint8_t
*/
uint8_t create_buffers();
@@ -18,22 +17,37 @@ uint8_t create_buffers();
/**
* @brief Update uniform buffers
*
* @param vulkan_state
*/
void update_uniform_buffers();
/**
* @brief Add vertices and indices to vulkan buffers
*
* @param vertices Vertices to add
* @param indices Indices to add
* @param vertices_num Number of vertices to add
* @param indices_num Number of indices to add
* @return uint8_t VULKAN_ERROR_NO_ERROR on success
*/
uint8_t update_mesh_buffers(const struct rse_vertex_t* vertices,
const uint16_t* indices,
size_t vertices_num,
size_t indices_num);
/**
* @brief Add instance data to vulkan buffers
*
* @param instance_data Instance data
* @return uint8_t VULKAN_ERROR_NO_ERROR on success
*/
uint8_t update_mesh_instances(struct rse_instance_data_t* instance_data);
/**
* @brief Record commands for given image index
*
* @param vulkan_state
* @param imageIndex
* @return uint8_t
* @return uint8_t VULKAN_ERROR_NO_ERROR on success
*/
uint8_t record_command_buffer(uint32_t imageIndex);