summaryrefslogtreecommitdiff
path: root/model.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'model.hpp')
-rw-r--r--model.hpp30
1 files changed, 17 insertions, 13 deletions
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