- Timestamp:
- Jan 13, 2015, 10:54:15 PM (10 years ago)
- Location:
- code/trunk/src/libraries/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/tools/BulletDebugDrawer.cc
r10193 r10195 11 11 #include <OgreRoot.h> 12 12 #include <OgreManualObject.h> 13 #include <OgreMaterialManager.h>14 13 #include <OgreSceneManager.h> 15 14 … … 25 24 26 25 mContactPoints = &mContactPoints1; 27 28 static const char* matName = "OgreBulletCollisionsDebugDefault";29 Ogre::MaterialPtr mtl = Ogre::MaterialManager::getSingleton().getDefaultSettings()->clone(matName);30 mtl->setReceiveShadows(false);31 mtl->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);32 mtl->setDepthBias(0.1, 0);33 Ogre::TextureUnitState* tu = mtl->getTechnique(0)->getPass(0)->createTextureUnitState();34 tu->setColourOperationEx(Ogre::LBX_SOURCE1, Ogre::LBS_DIFFUSE);35 mtl->getTechnique(0)->setLightingEnabled(false);36 //mtl->getTechnique(0)->setSelfIllumination(Ogre::ColourValue::White);37 26 38 27 mDebugMode = (DebugDrawModes) DBG_DrawWireframe; … … 135 124 // Right before the frame is rendered, call DebugDrawer::build(). 136 125 this->drawer_->build(); 126 137 127 return true; 138 128 } … … 142 132 // After the frame is rendered, call DebugDrawer::clear() 143 133 this->drawer_->clear(); 134 144 135 return true; 145 136 } -
code/trunk/src/libraries/tools/DebugDrawer.cc
r10194 r10195 15 15 #include <OgreManualObject.h> 16 16 #include <OgreAxisAlignedBox.h> 17 18 #include "util/Output.h"19 17 20 18 #define DEFAULT_ICOSPHERE_RECURSION_LEVEL 1 … … 402 400 manualObject->index(*i); 403 401 } 402 else 403 manualObject->index(0); // this is necessary to avoid crashes with ogre 1.7 if there's a light source in the level 404 404 manualObject->end(); 405 405 … … 417 417 manualObject->index(*i); 418 418 } 419 else 420 manualObject->index(0); // this is necessary to avoid crashes with ogre 1.7 if there's a light source in the level 419 421 manualObject->end(); 420 422 }
Note: See TracChangeset
for help on using the changeset viewer.