Fix bug with loading material textures

This commit is contained in:
Abdelrahman Said 2024-12-27 16:37:19 +00:00
parent d8d2c73438
commit 0db5c5d81a

View File

@ -710,7 +710,7 @@ std::vector<Texture2D> Model::load_material_textures(aiMaterial *material, aiTex
std::string absolute_path = directory + '/' + path.C_Str();
bool skip = false;
for (unsigned int j = 0; i < loaded_textures.size(); ++j) {
for (unsigned int j = 0; j < loaded_textures.size(); ++j) {
if (std::strcmp(loaded_textures[j].filename, absolute_path.c_str()) == 0) {
textures.push_back(loaded_textures[j]);
skip = true;