@@ -210,8 +210,7 @@ void display(void)
|
|
210
210
|
glViewport(0, 0, w, h); // Set viewport
|
211
211
|
|
212
212
|
glClearColor(g_clearColor[0], g_clearColor[1], g_clearColor[2], 1.0); // Set clear color
|
213
|
-
glClear(
|
214
|
-
// Instead of glClear(GL_BUFFER) the call should be glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
|
213
|
+
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clears the color buffer and the z-buffer
|
215
214
|
|
216
215
|
// We disable backface culling for this tutorial, otherwise care must be taken with the winding order
|
217
216
|
// of the vertices. It is however a lot faster to enable culling when drawing large scenes.
|