Changeset 8260 in orxonox.OLD for branches/water/src/world_entities
- Timestamp:
- Jun 8, 2006, 4:03:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/world_entities/environments/mapped_water.cc
r8249 r8260 242 242 //glEnable(GL_CLIP_PLANE0); 243 243 Vector pos = State::getCameraNode()->getAbsCoor(); 244 //pos.debug(); 245 //PRINTF(0)("waterheight: %f\n", waterHeight); 244 246 if(pos.y > waterHeight) 245 247 { … … 260 262 // but just render it clipped so only the top is drawn. 261 263 double plane[4] = {0.0, 1.0, 0.0, waterHeight}; 262 //glClipPlane(GL_CLIP_PLANE0, plane);264 glClipPlane(GL_CLIP_PLANE0, plane); 263 265 } 264 266 } … … 268 270 { 269 271 //glDisable(GL_CLIP_PLANE0); 270 //glCullFace(GL_BACK);272 glCullFace(GL_BACK); 271 273 272 274 //mat.select(); … … 299 301 //glEnable(GL_CLIP_PLANE0); 300 302 Vector pos = State::getCameraNode()->getAbsCoor(); 303 //pos.debug(); 304 //PRINTF(0)("waterheight: %f\n", waterHeight); 301 305 if(pos.y > waterHeight) 302 306 { … … 306 310 307 311 // Since the world is updside down we need to change the culling to FRONT 308 //glCullFace(GL_FRONT);312 glCullFace(GL_FRONT); 309 313 310 314 // Set our plane equation and turn clipping on … … 360 364 { 361 365 //glDisable(GL_CLIP_PLANE0); 362 //glCullFace(GL_BACK);366 glCullFace(GL_BACK); 363 367 364 368
Note: See TracChangeset
for help on using the changeset viewer.