diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 31183d0761..9466fd9abc 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -271,6 +271,18 @@ void NpcAnimation::runAnimation(float timepassed){ //insert-> //insert->detachObject(hand->getName()); Ogre::Entity* theentity = *entitypartsiter; + /* + Pass* pass = theentity->getSubEntity(0)->getMaterial()->getBestTechnique()->getPass(0); + if (pass->hasVertexProgram() && pass->getVertexProgram()->isSkeletalAnimationIncluded()) + std::cout << "It's hardware\n"; + else + std::cout << "It's software\n";*/ + //std::cout << "Techniques:" << theentity->getSubEntity(0)->getMaterial()->getNumTechniques() << "\n"; + /*if (pass->hasVertexProgram())// && pass->getVertexProgram()->isSkeletalAnimationIncluded()) value = "Hardware" + std::cout << "Its hardware\n"; + else + std::cout << "Its software\n";*/ + // handleAnimationTransforms(theentity); handleShapes(shapes, theentity, theentity->getSkeleton()); //insert->attachObject(hand); diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index a19f5df896..4cfbc3e7f3 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -217,6 +217,14 @@ void NIFLoader::createMaterial(const String &name, // will automatically be loaded when needed. If not (such as for // internal NIF textures that we might support later), we should // already have inserted a manual loader for the texture. + if(!mSkel.isNull()){ + material->removeAllTechniques(); + + Ogre::Technique* tech = material->createTechnique(); + //tech->setSchemeName("blahblah"); + Pass* pass = tech->createPass(); + pass->setVertexProgram("Ogre/HardwareSkinningFourWeights"); + } if (!texName.empty()) { Pass *pass = material->getTechnique(0)->getPass(0); @@ -276,6 +284,8 @@ void NIFLoader::createMaterial(const String &name, material->setSpecular(specular.array[0], specular.array[1], specular.array[2], alpha); material->setSelfIllumination(emissive.array[0], emissive.array[1], emissive.array[2]); material->setShininess(glossiness); + + } // Takes a name and adds a unique part to it. This is just used to