Changeset 12183 for code/branches/Merge_HS18/src/libraries/tools
- Timestamp:
- Dec 11, 2018, 6:33:26 PM (6 years ago)
- Location:
- code/branches/Merge_HS18
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Merge_HS18
- Property svn:mergeinfo changed
/code/branches/shader_HS18 (added) merged: 12034,12075-12076,12095,12098,12112-12113,12121,12123,12141
- Property svn:mergeinfo changed
-
code/branches/Merge_HS18/src/libraries/tools/Mesh.cc
r11783 r12183 35 35 #include <OgreSubEntity.h> 36 36 #include <OgreSceneManager.h> 37 #include <OgreHardwareVertexBuffer.h> 37 38 38 39 #include "util/Convert.h" … … 64 65 this->scenemanager_->destroyEntity(this->entity_); 65 66 67 66 68 if (GameMode::showsGraphics()) 67 69 { … … 70 72 this->entity_ = this->scenemanager_->createEntity("Mesh" + multi_cast<std::string>(Mesh::meshCounter_s++), meshsource); 71 73 this->entity_->setCastShadows(this->bCastShadows_); 72 } 73 catch (...) 74 75 76 unsigned short src, dest; 77 try 78 { 79 if (!this->entity_->getMesh()->suggestTangentVectorBuildParams(Ogre::VertexElementSemantic::VES_TANGENT, src, dest)) 80 { 81 orxout() << "Generate Tanget for \"" << meshsource << '"' << endl; 82 this->entity_->getMesh()->buildTangentVectors(Ogre::VertexElementSemantic::VES_TANGENT, src, dest); 83 // this version cleans mirrored and rotated UVs but requires quality models 84 // mesh->buildTangentVectors(VES_TANGENT, src, dest, true, true); 85 } 86 } catch (...) 87 { 88 orxout(internal_warning) << "Couldn't generat tangets for \"" << meshsource << '"' << endl; 89 } 90 91 } catch (...) 74 92 { 75 93 orxout(internal_error) << "Couldn't load mesh \"" << meshsource << '"' << endl; … … 107 125 this->entity_->getSubEntity(index)->setMaterialName(name); 108 126 } 109 else 127 else 110 128 orxout() << "ERROR at Index " << index << endl; 111 129 }
Note: See TracChangeset
for help on using the changeset viewer.