Changeset 8471 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects
- Timestamp:
- Jun 15, 2006, 3:18:34 PM (18 years ago)
- 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
r8457 r8471 79 79 this->fogFadeInDuration = 0; 80 80 this->fogFadeOutDuration = 0; 81 this->fogFadeInDensity = 0; 82 this->fogFadeOutDensity = 0; 81 this->fogFadeDensity = 0; 83 82 this->localTimer = 0; 84 83 this->fogActivate = false; … … 98 97 glFogfv(GL_FOG_COLOR, fogColor); 99 98 glHint(GL_FOG_HINT, GL_DONT_CARE); 99 glFogf(GL_FOG_DENSITY, this->fogDensity); 100 100 glFogf(GL_FOG_START, this->fogStart); 101 101 glFogf(GL_FOG_END, this->fogEnd); 102 103 if ( this->fogFadeInActivate )104 glFogf(GL_FOG_DENSITY, this->fogFadeInDensity);105 else if ( this->fogFadeOutActivate )106 glFogf(GL_FOG_DENSITY, this->fogFadeOutDensity);107 else108 glFogf(GL_FOG_DENSITY, this->fogDensity);109 102 110 103 glEnable(GL_FOG); … … 129 122 return; 130 123 131 // If Fog Fade In 132 if ( this->fogFadeInActivate ) 133 glFogf(GL_FOG_DENSITY, this->fogFadeInDensity); 134 135 // If Fog Fade Out 136 if ( this->fogFadeOutActivate ) 137 glFogf(GL_FOG_DENSITY, this->fogFadeOutDensity); 124 // If Fog Fade 125 if ( this->fogFadeInActivate || this->fogFadeOutActivate ) 126 glFogf(GL_FOG_DENSITY, this->fogFadeDensity); 138 127 139 128 } … … 145 134 if ( this->fogFadeInActivate ) { 146 135 this->localTimer += dt; 147 this->fogFade InDensity = ( this->localTimer / this->fogFadeInDuration ) * this->fogDensity;136 this->fogFadeDensity = ( this->localTimer / this->fogFadeInDuration ) * this->fogDensity; 148 137 149 138 if ( this->localTimer >= this->fogFadeOutDuration ) … … 153 142 if ( this->fogFadeOutActivate ) { 154 143 this->localTimer += dt; 155 this->fogFade OutDensity = 1 - (( this->localTimer / this->fogFadeInDuration ) * this->fogDensity);144 this->fogFadeDensity = 1 - (( this->localTimer / this->fogFadeInDuration ) * this->fogDensity); 156 145 157 146 if ( this->localTimer >= this->fogFadeOutDuration ) -
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.h
r8457 r8471 64 64 GLint stringToFogMode(const std::string& mode); 65 65 66 bool fogActivate;66 bool fogActivate; 67 67 68 bool fogFadeInActivate;69 bool fogFadeOutActivate;68 bool fogFadeInActivate; 69 bool fogFadeOutActivate; 70 70 71 71 GLfloat fogFadeInDuration; 72 72 GLfloat fogFadeOutDuration; 73 73 74 float localTimer;74 float localTimer; 75 75 76 GLint fogMode;76 GLint fogMode; 77 77 GLfloat fogDensity; 78 GLfloat fogFadeInDensity; 79 GLfloat fogFadeOutDensity; 78 GLfloat fogFadeDensity; 80 79 81 80 GLfloat fogStart; -
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
r8457 r8471 67 67 } 68 68 69 if(rainActivate) 69 if(rainActivate) { 70 70 this->activate(); 71 RainEffect::rainParticles->precache((int)this->rainLife); 72 } 71 73 } 72 74 … … 153 155 this->emitter->setSpread(this->rainWindForce / 50, 0.2); 154 156 155 RainEffect::rainParticles->precache((int)this->rainLife);156 157 157 this->soundSource.loop(this->rainBuffer, this->soundRainVolume); 158 158 if (this->rainWindForce != 0)
Note: See TracChangeset
for help on using the changeset viewer.