18.07.2014 Views

An Interactive Introduction to OpenGL Programming

An Interactive Introduction to OpenGL Programming

An Interactive Introduction to OpenGL Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>An</strong>imation Using Double<br />

Buffering<br />

1. Request a double buffered color buffer<br />

glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );<br />

2. Clear color buffer<br />

glClear( GL_COLOR_BUFFER_BIT );<br />

3. Render scene<br />

4. Request swap of front and back buffers<br />

glutSwapBuffers();<br />

• Repeat steps 2 - 4 for animation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!