From c9b80164071db2ef28f2541b8292116b3330f9dc Mon Sep 17 00:00:00 2001 From: Engin Manap Date: Thu, 26 Dec 2024 21:34:55 +0100 Subject: [PATCH] Fix move texture id indexes in the method --- src/GameObjects/Model.cpp | 6 ++++++ src/GameObjects/Model.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/GameObjects/Model.cpp b/src/GameObjects/Model.cpp index b0e5719b..c77faee2 100644 --- a/src/GameObjects/Model.cpp +++ b/src/GameObjects/Model.cpp @@ -155,6 +155,12 @@ void Model::setupForTime(long time) { } void Model::activateTexturesOnly(std::shared_ptrmaterial) 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); } diff --git a/src/GameObjects/Model.h b/src/GameObjects/Model.h index 2e017897..8dcb0baf 100644 --- a/src/GameObjects/Model.h +++ b/src/GameObjects/Model.h @@ -62,11 +62,6 @@ class Model : public PhysicalRenderable, public GameObject { btDefaultMotionState *motionState; std::vector 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 exposedBoneTransforms;