Wait for any pending SwapBuffers to complete before calling SwapBuffers.