Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7689 in orxonox.OLD for branches/atmospheric_engine


Ignore:
Timestamp:
May 18, 2006, 3:28:50 PM (19 years ago)
Author:
amaechler
Message:

branches/atmosphere_engine: fog weirdness…

Location:
branches/atmospheric_engine/src/lib/graphics/effects
Files:
3 edited

Legend:

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

    r7683 r7689  
    3333{
    3434        this->setClassID(CL_FOG_EFFECT, "FogEffect");
    35        
    36         this->fogMode = GL_LINEAR;
    37         this->fogDensity = 0.1f;
    38         this->fogStart = 0.0f;
    39         this->fogEnd = 5000.0f;
    40   this->colorVector = Vector(0.7, 0.7, 0.7);
     35
     36        this->init();
    4137
    4238        if (root != NULL)
     
    4541        this->activate();
    4642}
    47 
    4843
    4944
     
    6156        LoadParam(root, "fog-density", this, FogEffect, setFogDensity);
    6257        LoadParam(root, "fog-color", this, FogEffect, setFogColor);
    63 
    64 
    6558}
    6659
    6760bool FogEffect::init()
    68 {}
     61{
     62        //default values
     63        this->fogMode = GL_LINEAR;
     64        this->fogDensity = 0.1;
     65        this->fogStart = 0;
     66        this->fogEnd = 5000;
     67  this->colorVector = Vector(0.7, 0.7, 0.7);
     68}
    6969
    7070
     
    7676        glEnable(GL_FOG);
    7777        {
    78                 //GLfloat fogColor[4] = {0.7, 0.6, 0.6, 1.0};
    7978                GLfloat fogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0};
    8079
     
    8584                glFogf(GL_FOG_START, this->fogStart);
    8685                glFogf(GL_FOG_END, this->fogEnd);
    87 
    88                 //glFogi(GL_FOG_COORDINATE_SOURCE, GL_FOG_COORDINATE);
    8986        }
    9087        glClearColor(0.5, 0.5, 0.5, 1.0);
     
    9794        glDisable(GL_FOG);
    9895}
    99 
    10096
    10197
  • branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.h

    r7652 r7689  
    2828                inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); }
    2929
    30 
    3130        private:
    3231                GLint stringToFogMode(const std::string& mode);
    33 
    3432
    3533        private:
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc

    r7685 r7689  
    133133
    134134        if (this->rainMove) {
    135                 PRINTF(0)( "Moving Rain" );
    136135                this->rainCoord = State::getCameraNode()->getAbsCoor();
    137136                this->emitter->setRelCoor(this->rainCoord.x +150, this->rainCoord.y+700, this->rainCoord.z+150);
Note: See TracChangeset for help on using the changeset viewer.