diff options
author | quou <quou@disroot.org> | 2025-02-22 18:16:05 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-02-22 18:16:37 +1100 |
commit | ab9ed1ccadbd2c1b971bfbfb5ee651aa03a4a63e (patch) | |
tree | f08cddeb3f6ecb668dbac536d0ee2c533b0a55ee /model.hpp | |
parent | b10d6e5857481d4b018547c66585fd4f84a85937 (diff) |
shader globals
Diffstat (limited to 'model.hpp')
-rw-r--r-- | model.hpp | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -40,7 +40,8 @@ struct Mesh { mat_binding, light_binding, shadowmaps_binding, - casters_binding; + casters_binding, + globals_binding; int env_cube_binding; bool world_dirty; m4f world, local; @@ -98,6 +99,7 @@ struct Model_Resources { Texture_Id env_cubemap; Sampler_Id sampler; Buffer_Id vp; + Buffer_Id globals; void (*overrider)(Pipeline_Builder&); }; @@ -112,11 +114,7 @@ struct Model_Instance { void init(Device* dev, Heap* h, Model* model); void destroy(Device* dev, Heap* h); void update(); - void update_cbuffers( - Device* dev, - const Lighting& lighting, - const Camera& cam - ); + void update_cbuffers(Device* dev); void render( Device* dev, Arena* a, @@ -138,11 +136,7 @@ struct Model_Scene { void destroy(Device* dev); void init(Arena* arena, int max_instances, Sampler_Id s); - void update( - const Camera& cam, - const Lighting& lighting, - Device* dev - ); + void update(Device* dev); }; #endif |