Changeset 7392 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
- Timestamp:
- Apr 27, 2006, 9:49:33 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
r7381 r7392 20 20 #include "glincl.h" 21 21 22 22 #include "shell_command.h" 23 /*SHELL_COMMAND(activateFog, FogEffect, FogEffect::activate) 24 ->setAlias("aFog"); 25 SHELL_COMMAND(deactivateFog, FogEffect, FogEffect::deactivate) 26 ->setAlias("dFog");*/ 23 27 24 28 using namespace std; … … 26 30 CREATE_FACTORY(FogEffect, CL_FOG_EFFECT); 27 31 28 29 32 FogEffect::FogEffect(const TiXmlElement* root) 30 33 { 31 34 //this->setClassID(CL_FOG_EFFECT, "FogEffect"); 32 /* 35 33 36 this->fogMode = GL_LINEAR; 34 37 this->fogDensity = 0.001f; 35 38 this->fogStart = 10.0f; 36 39 this->fogEnd = 1000.0f; 37 */ 40 38 41 if (root != NULL) 39 42 this->loadParams(root); … … 54 57 WeatherEffect::loadParams(root); 55 58 56 /*57 59 LoadParam(root, "fog-mode", this, FogEffect, setFogMode); 58 60 59 61 LoadParam(root, "fog-density", this, FogEffect, setFogDensity); 60 62 61 LoadParam(root, "fog-color", this, FogEffect, setFogColor); */63 LoadParam(root, "fog-color", this, FogEffect, setFogColor); 62 64 63 LoadParam(root, "test", this, FogEffect, setTest);65 // LoadParam(root, "test", this, FogEffect, setTest); 64 66 65 67 … … 77 79 78 80 bool FogEffect::activate() 79 { /*81 { 80 82 PRINTF(0)( "Enabling Fog Effect, mode: %i, density: %f, start: %f, end: %f, color %f, %f, %f\n", this->fogMode, this->fogDensity, 81 83 this->fogStart, this->fogEnd, this->colorVector.x, this->colorVector.y, this->colorVector.z); 82 84 85 /*PRINTF(0)( "Enabling Fog Effect, mode: %i, density: %f, start: %f, end: %f\n", this->fogMode, this->fogDensity, 86 this->fogStart, this->fogEnd);*/ 87 83 88 glEnable(GL_FOG); 84 89 { 85 //GLfloat fogColor[4] = {0.7, 0.6, 0.6, 1.0};90 //GLfloat fogColor[4] = {0.7, 0.6, 0.6, 1.0}; 86 91 GLfloat fogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0}; 87 92 … … 95 100 //glFogi(GL_FOG_COORDINATE_SOURCE, GL_FOG_COORDINATE); 96 101 } 97 glClearColor(0.5, 0.5, 0.5, 1.0); */102 glClearColor(0.5, 0.5, 0.5, 1.0); 98 103 } 99 104 … … 102 107 bool FogEffect::deactivate() 103 108 { 104 //glDisable(GL_FOG);109 glDisable(GL_FOG); 105 110 } 106 111 107 112 108 /* 113 109 114 GLint FogEffect::stringToFogMode(const std::string& mode) 110 115 { … … 118 123 return -1; 119 124 } 120 */121 125 126
Note: See TracChangeset
for help on using the changeset viewer.