Refactor events.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
|
||||
#include "../src/defines.h"
|
||||
#include "../src/definitions/models.h"
|
||||
#include "primitiveModel.h"
|
||||
|
||||
void processNode(aiNode *node, const aiScene *scene, Model *model);
|
||||
@@ -196,18 +196,22 @@ Mesh processMesh(aiMesh *mesh, const aiScene *scene, Model *model) {
|
||||
// Material
|
||||
if(mesh->mMaterialIndex > 0) {
|
||||
aiMaterial *material = scene->mMaterials[mesh->mMaterialIndex];
|
||||
|
||||
std::vector<Texture> diffuseMaps = loadMaterialTextures(material, aiTextureType_DIFFUSE, texture_diffuse, ¤tMesh, model);
|
||||
|
||||
std::vector<Texture> diffuseMaps = loadMaterialTextures(
|
||||
material, aiTextureType_DIFFUSE, static_cast<int>(TextureType::Diffuse), ¤tMesh, model);
|
||||
textures.insert(textures.end(), diffuseMaps.begin(), diffuseMaps.end());
|
||||
|
||||
std::vector<Texture> specularMaps = loadMaterialTextures(material, aiTextureType_SPECULAR, texture_specular, ¤tMesh, model);
|
||||
std::vector<Texture> specularMaps = loadMaterialTextures(
|
||||
material, aiTextureType_SPECULAR, static_cast<int>(TextureType::Specular), ¤tMesh, model);
|
||||
textures.insert(textures.end(), specularMaps.begin(), specularMaps.end());
|
||||
|
||||
std::vector<Texture> normalMaps = loadMaterialTextures(material, aiTextureType_HEIGHT, texture_normal, ¤tMesh, model);
|
||||
std::vector<Texture> normalMaps = loadMaterialTextures(
|
||||
material, aiTextureType_HEIGHT, static_cast<int>(TextureType::Normal), ¤tMesh, model);
|
||||
textures.insert(textures.end(), normalMaps.begin(), normalMaps.end());
|
||||
|
||||
// Not entirely sure if aiTextureType_HEIGHT is correct
|
||||
std::vector<Texture> heightMaps = loadMaterialTextures(material, aiTextureType_HEIGHT, texture_height, ¤tMesh, model);
|
||||
std::vector<Texture> heightMaps = loadMaterialTextures(
|
||||
material, aiTextureType_HEIGHT, static_cast<int>(TextureType::Height), ¤tMesh, model);
|
||||
textures.insert(textures.end(), heightMaps.begin(), heightMaps.end());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user