32 #include <glm/vec3.hpp>
33 #include <glm/vec2.hpp>
35 #include "eng3d/mesh.hpp"
36 #include "eng3d/io.hpp"
59 virtual
void draw(const
Eng3D::OpenGL::Program& shader,
int instances = 0) const;
72 virtual
void draw(const
Eng3D::OpenGL::Program& shader,
int instances = 0)
const {
73 for(
auto& model : simple_models)
74 model.draw(shader, instances);
77 #ifdef E3D_FEATURE_ASSIMP
79 void process_node(aiNode& node,
const aiScene& scene);
85 std::map<std::string, std::shared_ptr<Eng3D::Model>> models;
95 std::shared_ptr<Eng3D::Model>
load(
const std::string& path);
96 std::shared_ptr<Eng3D::Model>
load(std::shared_ptr<Eng3D::IO::Asset::Base> asset);
ModelManager(Eng3D::State &_s)
void load(GameState &gs, const std::string &savefile_path)
A definition for a surface/color/texture to be applied to a model.
Packed model - packs both vertices and texcoords into the same buffer.
A complex object being composed by many simple objects.
std::vector< Eng3D::SimpleModel > simple_models
Model(const Model &)=delete
Model(Model &&) noexcept=default
A simple object - use these to store "simple" objects that MAY repeat.
SimpleModel(SimpleModel &&) noexcept=default
std::shared_ptr< Eng3D::Material > material
SimpleModel(const SimpleModel &)=delete
SimpleModel(enum Eng3D::MeshMode _mode)
virtual void draw(const Eng3D::OpenGL::Program &shader, int instances=0) const