[WIP] Refactor project

There are many problems with the way the current version is provided
and maintained. This commit or series of commits will fix this.
This commit is contained in:
Piotr Krygier committed 2025-06-20 13:44:33 +02:00
1 parent f5ab5f3f27
commit 173a82b9d1
63 files changed
+2663 -2239

No files matched your search

+12 -11
View File
@@ -9,11 +9,12 @@
*
*/
#ifndef RSE_MESH_CONTROLLER_H
#define RSE_MESH_CONTROLLER_H
#ifndef MESH_CONTROLLER_H
#define MESH_CONTROLLER_H
#include "vulkan_commons.h"
#include "utilities/rse_commons.h"
#include "graphics_context.h"
#include "utilities/commons.h"
/**
* @brief Create a new mesh for provided vertices and indices.
@@ -24,7 +25,7 @@
* @param indices_num indices count
* @return uint16_t Mesh identifier. Can be useful for getting vertices, indices and instances
*/
uint16_t create_mesh(struct rse_vertex_t* vertices,
uint16_t create_mesh(struct graphics_context_t* context, struct vertex_t* vertices,
uint16_t* indices,
size_t vertices_num,
size_t indices_num);
@@ -34,8 +35,8 @@ uint16_t create_mesh(struct rse_vertex_t* vertices,
* @param mesh_id Mesh id
* @param instance_data Transformation info
*/
rse_err_t create_mesh_instance(uint16_t mesh_id,
struct rse_instance_data_t instance_data);
rse_err_t create_mesh_instance(struct graphics_context_t* context, uint16_t mesh_id,
struct instance_data_t instance_data);
/**
* @brief Get the vertex count for mesh with mesh_id ID
@@ -43,7 +44,7 @@ rse_err_t create_mesh_instance(uint16_t mesh_id,
* @param mesh_id Mesh identifier
* @return size_t Number of vertices
*/
size_t get_vertices_count(uint16_t mesh_id);
size_t get_vertices_count(struct graphics_context_t* context, uint16_t mesh_id);
/**
* @brief Get the index count for mesh with mesh_id ID
@@ -51,7 +52,7 @@ size_t get_vertices_count(uint16_t mesh_id);
* @param mesh_id Mesh identifier
* @return size_t Number of indices
*/
size_t get_indices_count(uint16_t mesh_id);
size_t get_indices_count(struct graphics_context_t* context, uint16_t mesh_id);
/**
* @brief Get the instance count for mesh with mesh_id ID
@@ -59,7 +60,7 @@ size_t get_indices_count(uint16_t mesh_id);
* @param mesh_id Mesh identifier
* @return size_t Number of instances
*/
size_t get_instances_count(uint16_t mesh_id);
size_t get_instances_count(struct graphics_context_t* context, uint16_t mesh_id);
/**
* @brief Get vertex offset in vertex buffer for selected mesh
@@ -67,6 +68,6 @@ size_t get_instances_count(uint16_t mesh_id);
* @param mesh_id Mesh identifies
* @return size_t Offset
*/
size_t get_vertex_offset(uint16_t mesh_id);
size_t get_vertex_offset(struct graphics_context_t* context, uint16_t mesh_id);
#endif /* RSE_MESH_CONTROLLER_H */
#endif /* MESH_CONTROLLER_H */