next up previous
Next: OpenGL Basic Drawing: Up: OpenGL Quick Reference Guide Previous: Callbacks:

Miscellaneous Display Control Functions

Here are some miscellaneous routines that affect how drawing and displaying take place.

glutPostRedisplay(void):
Request that the image be redrawn.
glutSwapBuffers(void):
Swap the front and back buffers (used in double buffering).
glClearColor(GLclampf R, GLclampf G, GLclampf B, GLclampf A):
Specifies the background color to be used by glClear(), when clearing the buffer.
glClear(GLbitfield mask):
Clears one or more of the existing buffers. The mask is a logical or ("|") of any of the following: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM_BUFFER_BIT, or GL_STENCIL_BUFFER_BIT.
glFlush(void):
OpenGL normally saves or "buffers" drawing commands for greater efficiency. This forces the image to be redrawn, in case the next update will be far in the future.
glFinish(void):
This is like glFlush(), but it waits until all drawing has been finished before it returns.
glHint(GLenum target, GLenum mode):
Provides a hint as to how OpenGL should behave. Normally this is to suggest whether speed or accuracy is more important. The mode may be GL_DONT_CARE, GL_FASTEST, or GL_NICEST. Some target values include

Please report any errors or send comments to Dave Mount

Last updated: Sat, Feb 8, 2003.