24#include <glm/vec2.hpp>
25#include <glm/vec3.hpp>
35 std::vector<std::pair<int, asset::Texture*>>
textures;
36 std::vector<std::pair<std::string, glm::vec3>>
attributes;
46 shader->bindTexture(pair.first, pair.second->id);
49 shader->setVec3(pair.first, pair.second);
74 for (
auto& model_mesh :
meshes) {
78 auto& material =
materials[model_mesh->material];
79 material.SetShader(
shader);
85 for (
auto& model_mesh :
meshes) {
89 auto& material =
materials[model_mesh->material];
90 material.SetShader(
shader);
102 glm::vec3
normal = glm::vec3(0.f, 0.f, 0.f);
The base class for assets.
Definition: asset.h:159
Definition: assetmanager.h:145
AssetType
Definition: asset.h:33
std::shared_ptr< ShaderProgram > ShaderProgram_t
The preferred way of using a shader program.
Definition: shader.h:114
@ MODEL
Model prototype.
Definition: assetprototype.h:30
std::shared_ptr< ModelMesh > ModelMesh_t
Definition: model.h:58
void SetShader(ShaderProgram_t &shader)
Definition: model.h:44
~Material()
Definition: model.h:38
std::vector< std::pair< std::string, glm::vec3 > > attributes
Definition: model.h:36
std::vector< std::pair< int, asset::Texture * > > textures
Definition: model.h:35
AssetType GetAssetType() override
Definition: model.h:71
std::map< int, Material > materials
Definition: model.h:62
std::vector< ModelMesh_t > meshes
Definition: model.h:61
std::string shader_name
Definition: model.h:67
void Draw(ShaderProgram_t shader)
Definition: model.h:73
ShaderProgram_t shader
Definition: model.h:66
void PostLoad(AssetManager &)
Definition: model.cpp:22
void Draw()
Definition: model.h:84
glm::vec3 scale
Definition: model.h:63
int material
Definition: model.h:55
glm::vec2 texCoords
Definition: model.h:104
glm::vec3 normal
Definition: model.h:102
glm::vec3 position
Definition: model.h:100
glm::vec3 bitangent
Definition: model.h:108
static const int MAX_BONE_INFLUENCE
Definition: model.h:98
int m_BoneIDs[MAX_BONE_INFLUENCE]
Definition: model.h:110
float m_Weights[MAX_BONE_INFLUENCE]
Definition: model.h:112
glm::vec3 tangent
Definition: model.h:106