[ Previous | Next
| Table Of Contents

7.8 LONG pglIsIndirect(hab,hgc)

LONG pglIsIndirect(hab,hgc)

Description:

This function will return what type of context hgc is. The hgc parame- ter must have been returned from pglCreateContext.

Parameters:
HAB hab Handle to Anchor Block 
HGC hgc Handle to OpenGL context 

Return Values:
NULL This Context bypasses conventional PM blitting methods, and is faster. 
<0 Error occured. 
1 This Context uses conventional PM blitting methods, and while it is slower, allows an application to integrate OpenGL rendering and Gpi rendering commands. See notes section.

Notes:

If pglIsIndirect returns One, it uses Gpi to blit OpenGL rendering . Integration of OpenGL rendering and Gpi rendering is only allowed on Indirect contexts, and is controlled through the use of pglWaitPM and pglWaitGL. Applications must call pglGrabFrontBitmap when they need access to the actual bitmap, and call pglReleaseFrontBitmap when they are done with it.

Most things that can be done with Gpi can also be done with OpenGL, it is simpler to just use OpenGL with direct contexts, which will nor- mally be faster than an indirect context.

The PM Bitmap is not guaranteed to contain any OpenGL rendering until the OpenGL graphics pipeline has been flushed (glFlush, pglSwapBuffers, or pglWaitGL). 


[ Previous | Next | Table Of Contents ]