Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2008, 8:13:43 PM (15 years ago)
Author:
landauf
Message:
  • Removed directional-light-hack from Scene
  • Many changes in Light, works in all game-modes (standalone, dedicated, server and client)
  • Fixed a bug which caused clients to not having shadows

There's still a big problem, bug I can't explain it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/Scene.cc

    r2361 r2447  
    3333#include <OgreSceneManagerEnumerator.h>
    3434#include <OgreSceneNode.h>
    35 #include <OgreLight.h>
    3635
    3736#include "core/CoreIncludes.h"
     
    4847
    4948        this->setScene(this);
    50         this->bShadows_ = false;
     49        this->bShadows_ = true;
    5150
    5251        if (Core::showsGraphics())
     
    6968            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    7069        }
    71 
    72         // test test test
    73         if (Core::showsGraphics() && this->sceneManager_)
    74         {
    75             Ogre::Light* light;
    76             light = this->sceneManager_->createLight("Light-1");
    77             light->setType(Ogre::Light::LT_DIRECTIONAL);
    78             light->setDiffuseColour(ColourValue(1.0, 0.9, 0.6, 1.0));
    79             light->setSpecularColour(ColourValue(1.0, 0.9, 0.6, 1.0));
    80             light->setDirection(1, -0.3, 0.3);
    81         }
    82         // test test test
    8370
    8471        this->registerVariables();
     
    116103        REGISTERSTRING(this->skybox_,     direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
    117104        REGISTERDATA(this->ambientLight_, direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
     105        REGISTERDATA(this->bShadows_,     direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
    118106    }
    119107
Note: See TracChangeset for help on using the changeset viewer.