OpenGL man pages
glFinish - block until all GL execution is complete
void glFinish( void )
glFinish does not return until the effects of all previously called GL
commands are complete. Such effects include all changes to GL state, all
changes to connection state, and all changes to the frame buffer contents.
glFinish requires a round trip to the server.
GL_INVALID_OPERATION is generated if glFinish is executed between the
execution of glBegin and the corresponding execution of glEnd.
glFlush, glXWaitGL, glXWaitX
Fri Dec 6 11:18:03 EST 1996
Look here for legal stuff: Legal