diff options
Diffstat (limited to 'model.hpp')
-rw-r--r-- | model.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -2,17 +2,23 @@ #define model_hpp #include "asset.hpp" +#include "maths.hpp" #include "video.hpp" +struct Model; struct Mesh { int offset, vbo_offset, count; - int parent; + int parent, mesh_binding, mvp_binding; + bool world_dirty; + m4f local, world; Shader_Id shader; + const m4f& get_world(Model& m); }; struct Model : public Asset { Buffer_Id vbo; Buffer_Id ibo; + Buffer_Id mvp; int mesh_count; Mesh* get_meshes() { @@ -20,11 +26,13 @@ struct Model : public Asset { } void destroy(Device* dev); + void update_transforms(); void render( Device* dev, Arena* a, Render_Pass& pass, - Buffer_Id config + const m4f& transform, + const m4f& view_projection ); }; |