wip: model_flush

main
Dominik Madarász 2024-08-24 00:06:18 +02:00
parent 87e5d825e6
commit f7abcc036c
2 changed files with 11 additions and 5 deletions

View File

@ -27,7 +27,7 @@ index c980fa3..723b4da 100644
void model_shading(model_t*, int shading); void model_shading(model_t*, int shading);
void model_skybox(model_t*, skybox_t sky, bool load_sh); void model_skybox(model_t*, skybox_t sky, bool load_sh);
+ void model_lod(model_t*, float lo_detail, float hi_detail, float morph); + void model_lod(model_t*, float lo_detail, float hi_detail, float morph);
void model_render(model_t, mat44 proj, mat44 view, mat44 model, int shader); void model_render(&model_t, mat44 proj, mat44 view, mat44 model, int shader);
void model_render_skeleton(model_t, mat44 model); void model_render_skeleton(model_t, mat44 model);
void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count); void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count);
diff --git a/demos/99-terrain.c b/demos/99-terrain.c diff --git a/demos/99-terrain.c b/demos/99-terrain.c
@ -81,7 +81,7 @@ index 0000000..d5dddca
+ // draw scene + // draw scene
+ skybox_render(&sky, cam.proj, cam.view); + skybox_render(&sky, cam.proj, cam.view);
+ +
+ model_render(mdl, cam.proj, cam.view, mdl.pivot, 0); + model_render(&mdl, cam.proj, cam.view, mdl.pivot, 0);
+ } + }
+} +}
diff --git a/demos/art/meshes/terrain_demo.mtl b/demos/art/meshes/terrain_demo.mtl diff --git a/demos/art/meshes/terrain_demo.mtl b/demos/art/meshes/terrain_demo.mtl
@ -373945,7 +373945,7 @@ index a65b912..5aa71ff 100644
API void model_shading(model_t*, int shading); API void model_shading(model_t*, int shading);
API void model_skybox(model_t*, skybox_t sky, bool load_sh); API void model_skybox(model_t*, skybox_t sky, bool load_sh);
+API void model_lod(model_t*, float lo_detail, float hi_detail, float morph); +API void model_lod(model_t*, float lo_detail, float hi_detail, float morph);
API void model_render(model_t, mat44 proj, mat44 view, mat44 model, int shader); API void model_render(&model_t, mat44 proj, mat44 view, mat44 model, int shader);
API void model_render_skeleton(model_t, mat44 model); API void model_render_skeleton(model_t, mat44 model);
API void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count); API void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count);
@@ -371869,6 +371877,10 @@ void skybox_sh_add_light(skybox_t *sky, vec3 light, vec3 dir, float strength) { @@ -371869,6 +371877,10 @@ void skybox_sh_add_light(skybox_t *sky, vec3 light, vec3 dir, float strength) {
@ -374296,7 +374296,7 @@ index d11dfa1..ddff135 100644
API void model_shading(model_t*, int shading); API void model_shading(model_t*, int shading);
API void model_skybox(model_t*, skybox_t sky, bool load_sh); API void model_skybox(model_t*, skybox_t sky, bool load_sh);
+API void model_lod(model_t*, float lo_detail, float hi_detail, float morph); +API void model_lod(model_t*, float lo_detail, float hi_detail, float morph);
API void model_render(model_t, mat44 proj, mat44 view, mat44 model, int shader); API void model_render(&model_t, mat44 proj, mat44 view, mat44 model, int shader);
API void model_render_skeleton(model_t, mat44 model); API void model_render_skeleton(model_t, mat44 model);
API void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count); API void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count);
diff --git a/engine/v4k.c b/engine/v4k.c diff --git a/engine/v4k.c b/engine/v4k.c
@ -374490,6 +374490,6 @@ index b15c41f..f7ab11a 100644
API void model_shading(model_t*, int shading); API void model_shading(model_t*, int shading);
API void model_skybox(model_t*, skybox_t sky, bool load_sh); API void model_skybox(model_t*, skybox_t sky, bool load_sh);
+API void model_lod(model_t*, float lo_detail, float hi_detail, float morph); +API void model_lod(model_t*, float lo_detail, float hi_detail, float morph);
API void model_render(model_t, mat44 proj, mat44 view, mat44 model, int shader); API void model_render(&model_t, mat44 proj, mat44 view, mat44 model, int shader);
API void model_render_skeleton(model_t, mat44 model); API void model_render_skeleton(model_t, mat44 model);
API void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count); API void model_render_instanced(model_t, mat44 proj, mat44 view, mat44 *models, int shader, unsigned count);

View File

@ -0,0 +1,6 @@
diff --git a/depot b/depot
--- a/depot
+++ b/depot
@@ -1 +1 @@
-Subproject commit 171f20f37ad66748fa4ea9874eca1d6ef601d285
+Subproject commit 171f20f37ad66748fa4ea9874eca1d6ef601d285-dirty