From b8bf19b7a9f3a9ea02cfd0c57986d589b40a81d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 5 Nov 2008 07:38:46 -0500 Subject: [PATCH] Clear depth buffer, but only depth buffer for gears. --- gears.c | 2 ++ window.c | 1 + 2 files changed, 3 insertions(+) diff --git a/gears.c b/gears.c index db79d4d..9722eef 100644 --- a/gears.c +++ b/gears.c @@ -174,6 +174,8 @@ gears_draw(struct gears *gears, GLfloat angle) { GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; + glClear(GL_DEPTH_BUFFER_BIT); + glPushMatrix(); glTranslatef(0.0, 0.0, -50); diff --git a/window.c b/window.c index 7db8c2c..3cc894f 100644 --- a/window.c +++ b/window.c @@ -154,6 +154,7 @@ draw_window(struct window *window) window->config, window->name, window->width, window->height, window->stride, NULL); + if (surface == NULL) die("failed to create surface\n"); -- 2.7.4