OpenGL viewing notes - Bryn Mawr Computer Science
OpenGL viewing notes - Bryn Mawr Computer Science
OpenGL viewing notes - Bryn Mawr Computer Science
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Depth Buffering<br />
Request a depth buffer<br />
glutInitDisplayMode(GLUT_DEPTH|…);<br />
Enable depth buffering<br />
glEnable(GL_DEPTH_TEST);<br />
Clear color and depth buffers<br />
glClear(GL_COLOR_BUFFER_BIT |<br />
GL_DEPTH_BUFFER_BIT);<br />
Render scene<br />
Swap color buffers