Gpi calls made prior to pglWaitPM are guaranteed to be executed before OpenGL rendering calls made after pglWaitPM.
#include <pgl.h> HAB hab; pglWaitPM(hab);