#ifndef model_hpp #define model_hpp #include "asset.hpp" #include "video.hpp" struct Mesh { int offset, vbo_offset, count; int parent; Shader_Id shader; }; struct Model : public Asset { Buffer_Id vbo; Buffer_Id ibo; int mesh_count; Mesh* get_meshes() { return (Mesh*)&this[1]; } void destroy(Device* dev); void render( Device* dev, Arena* a, Render_Pass& pass, Buffer_Id config ); }; struct Model_Loader : public Asset_Loader { Device* dev; Asset_Arena* shaders; void init(Device* device, Asset_Arena* shader_arena); Asset* load(Arena* a, Arena* s, Pack_File* f) override; void unload(Asset* a); }; #endif