Рет қаралды 23,884
Shows how to turn on the depth test (z test) using glEnable(GL_DEPTH_TEST) to enable a write to the depth buffer (z-buffer). You must sort your geometry in the Z dimension. Also shows clearing the depth buffer using glClear(GL_DEPTH_BUFFER_BIT) and how these operations affect what is rendered to the screen.