Skip to content

Commit

Permalink
Use make_pair, fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyDaSilva committed Feb 22, 2016
1 parent 44d502c commit 95a5c4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Model::recursiveTextureLoad(const struct aiScene *sc, const aiNode* nd)
TextureAndPath reusedTexture;
reusedTexture.hTexture = it->second.hTexture;
reusedTexture.pathName = *str;
texturesAndPaths[std::pair<const aiNode*, int>(nd, n)] = reusedTexture;
texturesAndPaths[std::make_pair(nd, n)] = reusedTexture;
newTextureToBeLoaded = false;

std::cout << "Texture reused." << std::endl;
Expand Down Expand Up @@ -130,7 +130,7 @@ Model::recursiveTextureLoad(const struct aiScene *sc, const aiNode* nd)

std::cout << "texture loaded." << std::endl;

texturesAndPaths[std::pair<const aiNode*, int>(nd, n)] = newTexture;
texturesAndPaths[std::make_pair(nd, n)] = newTexture;
}
}
}
Expand Down Expand Up @@ -203,7 +203,7 @@ Model::recursive_render(const struct aiScene *sc, const aiNode* nd) const
const struct aiMesh* mesh = sc->mMeshes[nd->mMeshes[n]];

if (n < texturesAndPaths.size())
glBindTexture(GL_TEXTURE_2D, texturesAndPaths.at(std::pair<const aiNode*, int>(nd, n)).hTexture);
glBindTexture(GL_TEXTURE_2D, texturesAndPaths.at(std::make_pair(nd, n)).hTexture);

apply_material(sc->mMaterials[mesh->mMaterialIndex]);

Expand Down

0 comments on commit 95a5c4d

Please sign in to comment.