Changeset 7689 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
- Timestamp:
- May 18, 2006, 3:28:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
r7683 r7689 33 33 { 34 34 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(); 41 37 42 38 if (root != NULL) … … 45 41 this->activate(); 46 42 } 47 48 43 49 44 … … 61 56 LoadParam(root, "fog-density", this, FogEffect, setFogDensity); 62 57 LoadParam(root, "fog-color", this, FogEffect, setFogColor); 63 64 65 58 } 66 59 67 60 bool 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 } 69 69 70 70 … … 76 76 glEnable(GL_FOG); 77 77 { 78 //GLfloat fogColor[4] = {0.7, 0.6, 0.6, 1.0};79 78 GLfloat fogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0}; 80 79 … … 85 84 glFogf(GL_FOG_START, this->fogStart); 86 85 glFogf(GL_FOG_END, this->fogEnd); 87 88 //glFogi(GL_FOG_COORDINATE_SOURCE, GL_FOG_COORDINATE);89 86 } 90 87 glClearColor(0.5, 0.5, 0.5, 1.0); … … 97 94 glDisable(GL_FOG); 98 95 } 99 100 96 101 97
Note: See TracChangeset
for help on using the changeset viewer.