Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 16, 2006, 10:34:43 AM (19 years ago)
Author:
amaechler
Message:


File:
1 edited

Legend:

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

    r8495 r8521  
    8787
    8888void FogEffect::activate() {
    89     PRINTF(0)( "Enabling FogEffect, mode: %i, density: %f, start: %f, end: %f, color %f, %f, %f\n", this->fogMode, this->fogDensity, this->fogStart, this->fogEnd, this->colorVector.x, this->colorVector.y, this->colorVector.z);
     89    PRINTF(0)( "Activating FogEffect\n");
    9090
    91     this->fogActivate = true;
    92 
     91    // init fogGL
    9392    GLfloat fogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0};
    9493    glFogi(GL_FOG_MODE, this->fogMode);
     
    9897    glFogf(GL_FOG_START, this->fogStart);
    9998    glFogf(GL_FOG_END, this->fogEnd);
     99
     100    this->fogActivate = true;
    100101
    101102    glEnable(GL_FOG);
     
    127128
    128129void FogEffect::tick(float dt) {
     130
    129131    if (!this->fogActivate)
    130132        return;
     
    193195}
    194196
    195 
    196 GLint FogEffect::stringToFogMode(const std::string& mode) {
    197     if(mode == "GL_LINEAR")
    198         return GL_LINEAR;
    199     else if(mode == "GL_EXP")
    200         return GL_EXP;
    201     else if(mode == "GL_EXP2" )
    202         return GL_EXP2;
    203     else
    204         return -1;
    205 }
    206 
    207 
Note: See TracChangeset for help on using the changeset viewer.