Changeset 7558 in orxonox.OLD for branches/atmospheric_engine/src/lib
- Timestamp:
- May 9, 2006, 9:04:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc
r7557 r7558 19 19 20 20 #include "glincl.h" 21 22 21 #include "shell_command.h" 23 22 … … 56 55 57 56 // Set fog color 58 float fogColor[4] = {0. 4, 0.4, 0.4, 1.0};57 float fogColor[4] = {0.2, 0.2, 0.2, 1.0}; 59 58 60 59 // glClearColor(0.0, 0.0, 0.0, 1.0); //sets bg color?! … … 66 65 glFogf(GL_FOG_START, 0.0f); // Set The Fog Start 67 66 glFogf(GL_FOG_END, 1.0f); // Set The Fog End 68 glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); // Set Perspective Calculations To Most Accurate67 glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); 69 68 // glHint(GL_FOG_HINT, GL_NICEST); // Per-Pixel Fog Calculation 70 69 71 70 /* enable texturing & set texturing function */ 72 glEnable(GL_TEXTURE_2D);73 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);71 // glEnable(GL_TEXTURE_2D); 72 // glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 74 73 75 74 // ********************************************* … … 118 117 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 119 118 119 // glPushAttrib(GL_ENABLE_BIT); 120 121 glEnable(GL_BLEND); 122 glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA); 123 120 124 //glLoadIdentity (); // Reset The Modelview Matrix 121 122 125 123 126 // glBindTexture(GL_TEXTURE_2D, 0); … … 131 134 132 135 glBegin(GL_QUADS); // Roof 133 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f,0.0f);134 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,0.0f);135 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f, 100.0f);136 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f, 100.0f);136 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f,0.0f); 137 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,0.0f); 138 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f, 100.0f); 139 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f, 100.0f); 137 140 glEnd(); 138 141 … … 140 143 glFogCoordfEXT(0.0f); glVertex3f(0.0f,0.0f,0.0f); 141 144 glFogCoordfEXT(0.0f); glVertex3f( 100.0f,0.0f,0.0f); 142 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,0.0f);143 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f,0.0f);145 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,0.0f); 146 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f,0.0f); 144 147 glEnd(); 145 148 146 149 glBegin(GL_QUADS); // Front Wall 147 glFogCoordfEXT(0.0f); 150 glFogCoordfEXT(0.0f); glVertex3f(0.0f,0.0f,100.0f); 148 151 glFogCoordfEXT(0.0f); glVertex3f( 100.0f,0.0f,100.0f); 149 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,100.0f);150 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f,100.0f);152 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,100.0f); 153 glFogCoordfEXT(5.0f); glVertex3f(0.0f, 100.0f,100.0f); 151 154 glEnd(); 152 155 153 156 glBegin(GL_QUADS); // Right Wall 154 157 glFogCoordfEXT(0.0f); glVertex3f( 100.0f,0.0f, 100.0f); 155 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f, 100.0f);156 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,0.0f);158 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f, 100.0f); 159 glFogCoordfEXT(5.0f); glVertex3f( 100.0f, 100.0f,0.0f); 157 160 glFogCoordfEXT(0.0f); glVertex3f( 100.0f,0.0f,0.0f); 158 161 glEnd(); … … 169 172 170 173 // glPopAttrib(); 174 // glPopAttrib(); 171 175 } 172 173 174 176 175 177
Note: See TracChangeset
for help on using the changeset viewer.