Skip to content

Commit

Permalink
Fix move texture id indexes in the method
Browse files Browse the repository at this point in the history
  • Loading branch information
enginmanap committed Dec 26, 2024
1 parent 528c49c commit c9b8016
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/GameObjects/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ void Model::setupForTime(long time) {
}

void Model::activateTexturesOnly(std::shared_ptr<const Material>material) const {
const int diffuseMapAttachPoint = 1;
const int ambientMapAttachPoint = 2;
const int specularMapAttachPoint = 3;
const int opacityMapAttachPoint = 4;
const int normalMapAttachPoint = 5;

if(material->hasDiffuseMap()) {
graphicsWrapper->attachTexture(material->getDiffuseTexture()->getID(), diffuseMapAttachPoint);
}
Expand Down
5 changes: 0 additions & 5 deletions src/GameObjects/Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ class Model : public PhysicalRenderable, public GameObject {
btDefaultMotionState *motionState;
std::vector<btCollisionShape *> childrenPhysicsShapes;

int diffuseMapAttachPoint = 1;
int ambientMapAttachPoint = 2;
int specularMapAttachPoint = 3;
int opacityMapAttachPoint = 4;
int normalMapAttachPoint = 5;
uint32_t triangleCount;
int32_t selectedBoneID = -1;
std::map<uint32_t, Transformation*> exposedBoneTransforms;
Expand Down

0 comments on commit c9b8016

Please sign in to comment.