From 2e4ecca19aadc09d5c3d927724f8004b6a0ff0b0 Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 13 Feb 2025 23:32:28 +1100 Subject: refactoring; prep for shadows --- model.hpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'model.hpp') diff --git a/model.hpp b/model.hpp index d1b9449..23f3825 100644 --- a/model.hpp +++ b/model.hpp @@ -30,9 +30,16 @@ struct Material : public Asset { struct Model; struct Mesh { int offset, vbo_offset, count; - int parent, mesh_binding, mvp_binding, mat_binding, light_binding; + int + parent, + mesh_binding, + model_binding, + model_binding_depth, + vp_binding, + vp_binding_depth, + mat_binding, + light_binding; int env_cube_binding; - int mvp_binding_depth; bool world_dirty; m4f world, local; AABB bound; @@ -85,8 +92,14 @@ struct Material_Loader : public Asset_Loader { void unload(Asset* a) override; }; +struct Model_Resources { + Texture_Id env_cubemap; + Sampler_Id sampler; + Buffer_Id vp; +}; + struct Model_Instance { - Buffer_Id mvp; + Buffer_Id mcb; Buffer_Id mat; m4f transform; Model* m; @@ -105,8 +118,7 @@ struct Model_Instance { Arena* a, Render_Pass& pass, const Lighting* lighting, - Texture_Id env_cubemap, - Sampler_Id sampler + const Model_Resources& res ); }; @@ -126,14 +138,6 @@ struct Model_Scene { const Lighting& lighting, Device* dev ); - void render( - Device* dev, - Arena* a, - Render_Pass& pass, - const Lighting* lighting, - Texture_Id env_cubemap, - Sampler_Id sampler - ); }; #endif -- cgit v1.2.3-54-g00ecf