See pglWaitPM and pglWaitGL for integrating OpenGL and PM drawing. Applications should call pglReleaseFrontBitmap as soon as possible after locking the bitmap with pglGrapFrontBitmap.