summaryrefslogtreecommitdiff
path: root/progs/trivial/vbo-drawelements.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/trivial/vbo-drawelements.c')
-rw-r--r--progs/trivial/vbo-drawelements.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/progs/trivial/vbo-drawelements.c b/progs/trivial/vbo-drawelements.c
index 2894343118..dddb45695c 100644
--- a/progs/trivial/vbo-drawelements.c
+++ b/progs/trivial/vbo-drawelements.c
@@ -85,7 +85,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_ARB);
glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, NULL );
@@ -126,7 +126,7 @@ int main( int argc, char *argv[] )
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 250, 250 );
- glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE);
+ glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );