Disabling normal updates

actorid
Jason Hooks 13 years ago
parent 289b8f667e
commit a4c6d948d4

@ -53,14 +53,14 @@ namespace MWRender{
std::set<unsigned int> vertices;
std::set<unsigned int> normals;
//std::set<unsigned int> normals;
std::vector<Nif::NiSkinData::BoneInfoCopy> boneinfovector = copy.boneinfo;
//std::cout << "Name " << copy.sname << "\n";
Ogre::HardwareVertexBufferSharedPtr vbuf = creaturemodel->getMesh()->getSubMesh(copy.sname)->vertexData->vertexBufferBinding->getBuffer(0);
Ogre::Real* pReal = static_cast<Ogre::Real*>(vbuf->lock(Ogre::HardwareBuffer::HBL_NORMAL));
Ogre::HardwareVertexBufferSharedPtr vbufNormal = creaturemodel->getMesh()->getSubMesh(copy.sname)->vertexData->vertexBufferBinding->getBuffer(1);
Ogre::Real* pRealNormal = static_cast<Ogre::Real*>(vbufNormal->lock(Ogre::HardwareBuffer::HBL_NORMAL));
//Ogre::HardwareVertexBufferSharedPtr vbufNormal = creaturemodel->getMesh()->getSubMesh(copy.sname)->vertexData->vertexBufferBinding->getBuffer(1);
// Ogre::Real* pRealNormal = static_cast<Ogre::Real*>(vbufNormal->lock(Ogre::HardwareBuffer::HBL_NORMAL));
std::vector<Ogre::Vector3> initialVertices = copy.morph.getInitialVertices();
//Each shape has multiple indices
@ -164,7 +164,7 @@ namespace MWRender{
}
if(normals.find(verIndex) == normals.end())
/*if(normals.find(verIndex) == normals.end())
{
Ogre::Vector3 absNormalsPos = vecRot * allnormals[verIndex];
absNormalsPos = absNormalsPos * boneinfo.weights[j].weight;
@ -186,7 +186,7 @@ namespace MWRender{
*(addr+1) = absNormalsPos.y;
*(addr+2) = absNormalsPos.z;
}
}*/
}
}
@ -254,7 +254,7 @@ namespace MWRender{
*(addr+1) = current.y;
*(addr + 2) = current.z;
}
}/*
for(int i = 0; i < allnormals.size(); i++){
Ogre::Vector3 current =rotmult * allnormals[i];
Ogre::Real* addr = pRealNormal + i * 3;
@ -262,11 +262,11 @@ namespace MWRender{
*(addr+1) = current.y;
*(addr + 2) = current.z;
}
}*/
}
vbuf->unlock();
vbufNormal->unlock();
//vbufNormal->unlock();
}
}

@ -262,7 +262,7 @@ void NpcAnimation::runAnimation(float timepassed){
// handleAnimationTransforms(base);
//handleAnimationTransforms(hand);
//
/*std::vector<std::vector<Nif::NiTriShapeCopy>*>::iterator shapepartsiter = shapeparts.begin();
std::vector<std::vector<Nif::NiTriShapeCopy>*>::iterator shapepartsiter = shapeparts.begin();
std::vector<Ogre::Entity*>::iterator entitypartsiter = entityparts.begin();
//int i = 0;
while(shapepartsiter != shapeparts.end())
@ -277,7 +277,7 @@ void NpcAnimation::runAnimation(float timepassed){
//std::cout << "Shape part size" << shapes->size() << "\n";
shapepartsiter++;
entitypartsiter++;
}*/
}
}
}

Loading…
Cancel
Save