Mesh_Entities!

This commit is contained in:
2025-03-26 23:40:35 +01:00
parent 74268015a0
commit b6b1371af5
12 changed files with 145 additions and 31 deletions

View File

@@ -586,7 +586,7 @@ Renderer :: struct {
fonts : [..] Font;
render_graph : *Render_Graph;
model_lib : Bucket_Array(Model, 128);
model_lib : Static_Array(Model, 128);
callbacks : struct {
get_custom_material_parameter_mapping: (mapping_str: string) -> bool, Material_Mapping_Info;
@@ -605,7 +605,7 @@ Renderer :: struct {
render_target_height: u32;
default_models : struct {
sphere: Model;
sphere: Model_Handle;
}
default_meshes : struct {
@@ -1627,6 +1627,12 @@ create_material_from_pipeline :: (pipeline: Pipeline_State_Handle) -> Material_O
return material;
}
get_model_by_handle :: (handle: Model_Handle) -> *Model {
if handle == 0 return null;
return *engine.renderer.model_lib[handle-1];
}
check_for_shader_modifications :: () {
changed, needs_wait, wait_seconds := process_changes(*engine.renderer.watcher);
}