Add a basic entity class

This commit is contained in:
4VRDriver
2020-09-06 13:02:40 +02:00
parent c0cbf8c257
commit e4139105ee
20 changed files with 150 additions and 77 deletions

View File

@@ -3,6 +3,8 @@
#include <iostream>
Model::Model(const char* pathToModel) {
// Todo: check if model isn't already loaded --> will boost startup time drastically
// actually all models should be loaded at startup and only a handle should be given to the entites...
loadModel(pathToModel);
}
@@ -128,7 +130,7 @@ std::vector<Texture*> Model::loadMaterialTextures(aiMaterial *mat, aiTextureType
Texture *texture = new Texture(currentPath.c_str(), textureType);
loadedTextures.push_back(texture);
// Add newest texture pointer to the mesh's texture vector
// Add newest texture pointer to the mesh's texture-pointer vector
Texture *new_tex = loadedTextures.back();
textures.push_back(new_tex);
}