glFinish, not glFlush, guarantees no flickering.