Changeset 8521 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
- Timestamp:
- Jun 16, 2006, 10:34:43 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
r8495 r8521 87 87 88 88 void 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"); 90 90 91 this->fogActivate = true; 92 91 // init fogGL 93 92 GLfloat fogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0}; 94 93 glFogi(GL_FOG_MODE, this->fogMode); … … 98 97 glFogf(GL_FOG_START, this->fogStart); 99 98 glFogf(GL_FOG_END, this->fogEnd); 99 100 this->fogActivate = true; 100 101 101 102 glEnable(GL_FOG); … … 127 128 128 129 void FogEffect::tick(float dt) { 130 129 131 if (!this->fogActivate) 130 132 return; … … 193 195 } 194 196 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 else204 return -1;205 }206 207
Note: See TracChangeset
for help on using the changeset viewer.