Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6980 in orxonox.OLD for trunk/src/lib/graphics/effects


Ignore:
Timestamp:
Feb 2, 2006, 1:57:21 PM (19 years ago)
Author:
patrick
Message:

trunk: lenseflares loadable

Location:
trunk/src/lib/graphics/effects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/effects/fog_effect.cc

    r6977 r6980  
    3737 FogEffect::FogEffect(const TiXmlElement* root)
    3838{
    39   PRINTF(0)("Fog Effect Created\n");
    4039  this->setClassID(CL_FOG_EFFECT, "FogEffect");
    4140
     
    4443  this->fogStart = 10.0f;
    4544  this->fogEnd = 1000.0f;
    46 
    4745
    4846  if (root != NULL)
     
    5553 */
    5654FogEffect::~FogEffect()
    57 {}
     55{
     56  this->deactivate();
     57}
    5858
    5959
     
    6363void FogEffect::loadParams(const TiXmlElement* root)
    6464{
    65   PRINTF(0)(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.loadParms\n\n");
    66 
    6765  GraphicsEffect::loadParams(root);
    6866
    69    LoadParam(root, "fog-mode", this, FogEffect, setFogMode)
    70        .describe("sets the the fog mode {GL_LINEAR, GL_EXP, GL_EXP2}");
    7167
    72    LoadParam(root, "fog-density", this, FogEffect, setFogDensity)
    73        .describe("sets the the fog density of the exponentionl functions");
     68  LoadParam(root, "fog-mode", this, FogEffect, setFogMode)
     69      .describe("sets the the fog mode {GL_LINEAR, GL_EXP, GL_EXP2}");
    7470
    75    LoadParam(root, "fog-range", this, FogEffect, setFogRange)
    76        .describe("sets the the range of the linear functions");
     71  LoadParam(root, "fog-density", this, FogEffect, setFogDensity)
     72      .describe("sets the the fog density of the exponentionl functions");
     73
     74  LoadParam(root, "fog-range", this, FogEffect, setFogRange)
     75      .describe("sets the the range of the linear functions");
    7776}
    7877
     
    9089bool FogEffect::activate()
    9190{
    92   printf("fog==============================================>>>>>>>>>>>>>>>>>>>>>>>>...\n\n");
    9391  PRINTF(4)( "Enabling Fog Effect, mode: %i, density: %f, start: %f, end: %f\n", this->fogMode, this->fogDensity,
    9492             this->fogStart, this->fogEnd);
  • trunk/src/lib/graphics/effects/lense_flare.cc

    r6976 r6980  
    4646 LenseFlare::LenseFlare(const TiXmlElement* root)
    4747{
    48   if (root != NULL)
    49     this->loadParams(root);
     48  this->setClassID(CL_LENSE_FLARE, "LenseFlare");
    5049
    5150  this->flareMatrix = new float[14];
     
    6059
    6160  this->lightSource = (LightManager::getInstance())->getLight(0);
     61  PRINTF(0)("light is: %p\n", this->lightSource);
     62
     63  if (root != NULL)
     64  {
     65    this->loadParams(root);
     66    this->activate();
     67  }
    6268}
    6369
     
    8187  GraphicsEffect::loadParams(root);
    8288
    83     LoadParam(root, "add-flare-texture", this, LenseFlare, addFlare)
     89  LOAD_PARAM_START_CYCLE(root, element);
     90  {
     91    LoadParam_CYCLE(element, "add-flare-texture", this, LenseFlare, addFlare)
    8492        .describe("adds a lensflare texture to the engine");
    85 }
    86 
     93  }
     94  LOAD_PARAM_END_CYCLE(element);
     95}
    8796
    8897/**
     
    151160    bb->setVisibility(true);
    152161  }
     162  PRINTF(0)("Finished adding\n", textureName);
    153163}
    154164
Note: See TracChangeset for help on using the changeset viewer.