Remove VulkanState dependency

Passing VulkanState everywhere (including windowLoop) made no sense.
I know that "globals are evil", but this is the best solution for now.
This commit is contained in:
Piotr Krygier committed 2023-04-04 15:27:42 +02:00
1 parent e06288320d
commit 6781c1cff1
16 files changed
+285 -272

No files matched your search

+2 -4
View File
@@ -47,8 +47,7 @@ struct Mesh
* @param indices indices for mesh
* @return uint16_t Mesh identifier. Can be useful for getting vertices, indices and instances
*/
uint16_t create_mesh(rse::graphics::vulkanbase::VulkanState& vulkan_state,
std::vector<rse::graphics::vulkanbase::Vertex> vertices,
uint16_t create_mesh(std::vector<rse::graphics::vulkanbase::Vertex> vertices,
std::vector<uint16_t> indices);
/**
@@ -57,8 +56,7 @@ uint16_t create_mesh(rse::graphics::vulkanbase::VulkanState& vulkan_state,
* @param mesh_id Mesh id
* @param instance_data Transformation info
*/
void create_mesh_instance(rse::graphics::vulkanbase::VulkanState& vulkan_state,
uint16_t mesh_id,
void create_mesh_instance(uint16_t mesh_id,
InstanceData instance_data);
std::vector<rse::graphics::vulkanbase::Vertex> get_mesh_vertices(uint16_t mesh_id);