Changeset 2939 for code/branches/toonshader/src
- Timestamp:
- Apr 29, 2009, 4:38:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/toonshader/src/orxonox/objects/worldentities/Model.cc
r2896 r2939 30 30 31 31 #include <OgreEntity.h> 32 #include <OgreMaterialManager.h> 32 33 #include "Model.h" 33 34 #include "core/GameMode.h" … … 61 62 XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 62 63 XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); 64 65 //HACK 66 if (true)//this->meshSrc_ == "assasdfff.mesh") 67 { 68 this->mesh_.getEntity()->setMaterialName("ToonShader"); 69 static bool load = true; 70 71 if (load) 72 { 73 Ogre::MaterialPtr matPtr = Ogre::MaterialManager::getSingleton().getByName("ToonShader"); 74 if (!matPtr.isNull()) { 75 // is this necessary to do here? Someday try it without 76 matPtr->compile(); 77 matPtr->load(); 78 } 79 else 80 COUT(0) << "frakking shader\n"; 81 82 COUT(0) << "shiiit\n"; 83 84 //Ogre::MaterialManager& mm = Ogre::MaterialManager::getSingleton(); 85 //Ogre::Material* m = Ogre::Material*(Ogre::MaterialManager::getSingleton().getByName("ToonShader")); 86 load = false; 87 } 88 } 63 89 } 64 90 … … 85 111 } 86 112 } 113 if (true)//this->meshSrc_ == "assasdfff.mesh") 114 { 115 this->mesh_.getEntity()->setMaterialName("ToonShader"); 116 } 87 117 } 88 118
Note: See TracChangeset
for help on using the changeset viewer.