|
|
|
|
@ -44,22 +44,33 @@ struct SDL_Handles
|
|
|
|
|
// --------------------------
|
|
|
|
|
// Memory allocation WIP
|
|
|
|
|
|
|
|
|
|
#define MAX_PATH_SIZE 256 |
|
|
|
|
struct render_asset |
|
|
|
|
struct mesh_asset |
|
|
|
|
{ |
|
|
|
|
// header
|
|
|
|
|
size_t size; |
|
|
|
|
uint name_len; |
|
|
|
|
uint num_vertices; |
|
|
|
|
uint num_indices; |
|
|
|
|
render_asset* next; |
|
|
|
|
mesh_asset* next; |
|
|
|
|
|
|
|
|
|
// data
|
|
|
|
|
char* filepath; |
|
|
|
|
glm::vec3* vertices; |
|
|
|
|
uint* indices; |
|
|
|
|
glm::vec3* texture_coords; |
|
|
|
|
glm::mat4* model_transform; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#define MAX_PATH_SIZE 256 |
|
|
|
|
struct render_asset |
|
|
|
|
{ |
|
|
|
|
// header
|
|
|
|
|
size_t size; |
|
|
|
|
uint num_meshes; |
|
|
|
|
uint name_len; |
|
|
|
|
render_asset* next; |
|
|
|
|
|
|
|
|
|
// data
|
|
|
|
|
char* filepath; |
|
|
|
|
mesh_asset* meshes; |
|
|
|
|
// FIXME: also need to flatten diffuse_texture->pixels and track size of
|
|
|
|
|
// util_image structure, ie) another heaader + pixels
|
|
|
|
|
util_image* diffuse_texture; |
|
|
|
|
|