Changeset 8316 in orxonox.OLD for trunk/src/lib/graphics/effects/fog_effect.cc
- Timestamp:
- Jun 11, 2006, 1:57:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/effects/fog_effect.cc
r8255 r8316 72 72 this->fogFadeDuration = 0; 73 73 this->localTimer = 0; 74 74 75 75 this->fogMode = GL_EXP2; 76 76 this->fogDensity = 0.001; … … 79 79 this->colorVector = Vector(0.7, 0.7, 0.7); 80 80 81 return true; 81 82 } 82 83 … … 87 88 88 89 this->fogActivate = true; 89 90 90 91 GLfloat fogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0}; 91 92 glFogi(GL_FOG_MODE, this->fogMode); … … 95 96 glFogf(GL_FOG_START, this->fogStart); 96 97 glFogf(GL_FOG_END, this->fogEnd); 97 98 98 99 glEnable(GL_FOG); 99 100 // glClearColor(0.5, 0.5, 0.5, 1.0); 101 return true; 100 102 } 101 103 … … 106 108 107 109 this->fogActivate = false; 108 110 109 111 glDisable(GL_FOG); 112 113 return true; 110 114 } 111 115 … … 122 126 if (!this->fogActivate) 123 127 return; 124 128 125 129 126 130 if (this->fogFadeDuration != 0 && this->localTimer < this->fogFadeDuration) {
Note: See TracChangeset
for help on using the changeset viewer.