use a depth buffer temporarily
authorKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 13:13:42 +0000 (13:13 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 13:13:53 +0000 (13:13 +0000)
progs/trivial/vp-tri.c

index f8e18654c601659f702e5e952659de0d25f613e5..b3ac52b5099fc610760528d29e8d33c3d15ff044 100644 (file)
@@ -43,7 +43,7 @@ static void Init( void )
 static void Display( void )
 {
    glClearColor(0.3, 0.3, 0.3, 1);
-   glClear( GL_COLOR_BUFFER_BIT  );
+   glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
 
    glEnable(GL_VERTEX_PROGRAM_NV);
 
@@ -93,7 +93,7 @@ int main( int argc, char *argv[] )
    glutInit( &argc, argv );
    glutInitWindowPosition( 0, 0 );
    glutInitWindowSize( 250, 250 );
-   glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
+   glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
    glutCreateWindow(argv[0]);
    glutReshapeFunc( Reshape );
    glutKeyboardFunc( Key );