diff options
author | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-25 17:35:27 +1100 |
---|---|---|
committer | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-25 17:35:27 +1100 |
commit | 90dd96cbc9b09cdc75977b115a9b61fa7547baef (patch) | |
tree | 013eafe6ba0bf9f4d0e6f1947e22d7fda02707ec /src/renderer | |
parent | 938f745f052c14fccaa987b98ea4ac84e70c1fcc (diff) |
boilerplate for more examples
Diffstat (limited to 'src/renderer')
-rw-r--r-- | src/renderer/render_types.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/renderer/render_types.h b/src/renderer/render_types.h index e24fc24..f63f3f8 100644 --- a/src/renderer/render_types.h +++ b/src/renderer/render_types.h @@ -57,7 +57,7 @@ typedef struct mesh { u32 *indices; u32 indices_len; size_t material_index; - u32 vbo, vao; /** OpenGL data */ + u32 vbo, vao; /** OpenGL data. TODO: dont leak OpenGL details */ } mesh; #ifndef TYPED_MESH_ARRAY @@ -67,9 +67,39 @@ KITC_DECL_TYPED_ARRAY(mesh) // creates "mesh_darray" typedef struct model { str8 name; + mesh_darray meshes; + aabb_3d bbox; + // TODO: materials + bool is_loaded; + bool is_uploaded; } model; #ifndef TYPED_MODEL_ARRAY KITC_DECL_TYPED_ARRAY(model) // creates "model_darray" #define TYPED_MODEL_ARRAY -#endif
\ No newline at end of file +#endif + +// --- Graphics API related + +typedef enum cel_primitive_topology { + CEL_PRIMITIVE_TOPOLOGY_POINT, + CEL_PRIMITIVE_TOPOLOGY_LINE, + CEL_PRIMITIVE_TOPOLOGY_LINE_STRIP, + CEL_PRIMITIVE_TOPOLOGY_TRIANGLE, + CEL_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, + CEL_PRIMITIVE_TOPOLOGY_COUNT +} cel_primitive_topology; + +typedef enum gpu_texture_type { + TEXTURE_TYPE_2D, + TEXTURE_TYPE_3D, + TEXTURE_TYPE_2D_ARRAY, + TEXTURE_TYPE_CUBE_MAP, + TEXTURE_TYPE_COUNT +} gpu_texture_type; + +typedef enum gpu_texture_format { + TEXTURE_FORMAT_8_8_8_8_RGBA_UNORM, + TEXTURE_FORMAT_DEPTH_DEFAULT, + TEXTURE_FORMAT_COUNT +} gpu_texture_format;
\ No newline at end of file |