Changeset 9073 in orxonox.OLD for branches/terrain/src/lib/graphics/importer
- Timestamp:
- Jul 3, 2006, 11:39:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/graphics/importer/terrain/terrain.cc
r9071 r9073 238 238 } 239 239 } 240 240 241 void Terrain::draw( ) 241 242 { … … 247 248 //Due to some reason, the OpenGL implementors chose the plane equation 248 249 //to an array of doubles. So we will make them happy. 249 //double farPlane[] = { far.n.x, far.n.y, far.n.z, far.d };250 //glEnable( GL_CLIP_PLANE0 );251 //glClipPlane( GL_CLIP_PLANE0, farPlane );250 double farPlane[] = { far.n.x, far.n.y, far.n.z, far.d }; 251 glEnable( GL_CLIP_PLANE0 ); 252 glClipPlane( GL_CLIP_PLANE0, farPlane ); 252 253 glPushAttrib( GL_ALL_ATTRIB_BITS ); 253 254 glPushClientAttrib( GL_CLIENT_VERTEX_ARRAY_BIT ); … … 266 267 glDisableClientState( GL_NORMAL_ARRAY ); 267 268 glDisable( GL_CULL_FACE ); 268 glCullFace( GL_BACK );269 269 glDisable( GL_LIGHTING ); 270 270 glColor3f( 1.0f, 1.0f, 1.0f ); … … 291 291 glDisable( GL_TEXTURE_2D ); 292 292 } 293 293 glEnable( GL_CULL_FACE ); 294 glCullFace( GL_BACK ); 294 295 glClientActiveTextureARB( GL_TEXTURE0_ARB ); 295 296 glActiveTextureARB( GL_TEXTURE0_ARB ); … … 305 306 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); 306 307 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); 307 glEnable( GL_CULL_FACE );308 308 309 for ( unsigned j = 0; j < buffers.size(); ++j ) { 309 310 BufferInfo bi = buffers[j]; … … 336 337 glPopAttrib(); 337 338 glPopClientAttrib(); 339 glCullFace( GL_FRONT ); 338 340 glDisable( GL_CLIP_PLANE0 ); 339 341 }
Note: See TracChangeset
for help on using the changeset viewer.