From a4c6d948d47941dbe95bc33fef7e9752cde610b1 Mon Sep 17 00:00:00 2001 From: Jason Hooks Date: Sun, 1 Jan 2012 20:51:26 -0500 Subject: [PATCH] Disabling normal updates --- apps/openmw/mwrender/animation.cpp | 16 ++++++++-------- apps/openmw/mwrender/npcanimation.cpp | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 7f59bc7d1..bea0873b7 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -53,14 +53,14 @@ namespace MWRender{ std::set vertices; - std::set normals; + //std::set normals; std::vector 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(vbuf->lock(Ogre::HardwareBuffer::HBL_NORMAL)); - Ogre::HardwareVertexBufferSharedPtr vbufNormal = creaturemodel->getMesh()->getSubMesh(copy.sname)->vertexData->vertexBufferBinding->getBuffer(1); - Ogre::Real* pRealNormal = static_cast(vbufNormal->lock(Ogre::HardwareBuffer::HBL_NORMAL)); + //Ogre::HardwareVertexBufferSharedPtr vbufNormal = creaturemodel->getMesh()->getSubMesh(copy.sname)->vertexData->vertexBufferBinding->getBuffer(1); + // Ogre::Real* pRealNormal = static_cast(vbufNormal->lock(Ogre::HardwareBuffer::HBL_NORMAL)); std::vector 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(); } } diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index c5c5c3ff5..31183d076 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -262,7 +262,7 @@ void NpcAnimation::runAnimation(float timepassed){ // handleAnimationTransforms(base); //handleAnimationTransforms(hand); // - /*std::vector*>::iterator shapepartsiter = shapeparts.begin(); + std::vector*>::iterator shapepartsiter = shapeparts.begin(); std::vector::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++; - }*/ + } } }