Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2008, 11:40:06 PM (16 years ago)
Author:
janise
Message:

compositors and shader work with hacks. added a directional light

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/Orxonox.cc

    r1454 r1466  
    7070// objects and tools
    7171#include "hud/HUD.h"
     72#include <Ogre.h>
     73
     74#include "GraphicsEngine.h"
    7275
    7376// FIXME: is this really file scope?
     
    340343    Level* startlevel = new Level("levels/sample.oxw");
    341344    Loader::open(startlevel);
    342 
     345   
     346
     347    Ogre::SceneManager* mSceneMgr = GraphicsEngine::getSingleton().getSceneManager();
     348    mSceneMgr->setAmbientLight(ColourValue(0.4,0.4,0.4));
     349    Ogre::Light* dirlight = mSceneMgr->createLight("Light1");
     350
     351       dirlight->setType(Ogre::Light::LT_DIRECTIONAL);
     352       dirlight->setDirection(Vector3( 0, 1, 5 ));
     353       dirlight->setDiffuseColour(ColourValue(0.6, 0.6, 0.4));
     354       dirlight->setSpecularColour(ColourValue(1.0, 1.0, 1.0));
     355   
    343356    return true;
    344357  }
     
    380393    clock_t time = 0;
    381394
     395    //Ogre::SceneManager* mSceneMgr = GraphicsEngine::getSingleton().getSceneManager();
     396    //Ogre::Viewport* mViewport = mSceneMgr->getCurrentViewport();
     397   
     398    //Ogre::CompositorManager::getSingleton().addCompositor(mViewport, "Bloom");
     399    //Ogre::CompositorManager::getSingleton().addCompositor(mViewport, "MotionBlur");
     400
    382401    COUT(3) << "Orxonox: Starting the main loop." << std::endl;
    383402          while (!bAbort_)
Note: See TracChangeset for help on using the changeset viewer.