mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Hardware skinning working (YESgit add components --allgit add components --allgit add components --allgit add components --allgit add components --allgit add components --allgit add components --allgit add components --allgit add components --allgit add components --allgit add components --all)
This commit is contained in:
parent
a4c6d948d4
commit
762727308e
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user