Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11814


Ignore:
Timestamp:
Feb 24, 2018, 7:40:03 PM (7 years ago)
Author:
landauf
Message:

fixed material of debug drawer (to visualize collision shapes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cegui0.8_ogre1.9/src/libraries/tools/DebugDrawer.cc

    r11099 r11814  
    3434    void DebugDrawer::initialise()
    3535    {
     36        Ogre::ResourcePtr resourcePtr = Ogre::MaterialManager::getSingleton().createOrRetrieve("debug_draw", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true).first;
     37        Ogre::Material* material = dynamic_cast<Ogre::Material*>(resourcePtr.get());
     38        material->getTechnique(0)->getPass(0)->setVertexColourTracking(Ogre::TrackVertexColourEnum::TVC_AMBIENT);
     39        material->getTechnique(0)->getPass(0)->setLightingEnabled(false);
     40        material->getTechnique(0)->getPass(0)->setDepthWriteEnabled(false);
     41        material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SceneBlendType::SBT_TRANSPARENT_ALPHA);
     42
    3643        manualObject = sceneManager->createManualObject("debug_object");
    3744        sceneManager->getRootSceneNode()->createChildSceneNode("debug_object")->attachObject(manualObject);
Note: See TracChangeset for help on using the changeset viewer.