Changeset 7689 in orxonox.OLD for branches/atmospheric_engine
- Timestamp:
- May 18, 2006, 3:28:50 PM (19 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
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 -
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.h
r7652 r7689 28 28 inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); } 29 29 30 31 30 private: 32 31 GLint stringToFogMode(const std::string& mode); 33 34 32 35 33 private: -
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
r7685 r7689 133 133 134 134 if (this->rainMove) { 135 PRINTF(0)( "Moving Rain" );136 135 this->rainCoord = State::getCameraNode()->getAbsCoor(); 137 136 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.