[ Previous | Next | Table Of Contents

7.13 void pglSwapBuffers(hab,hwnd)

void pglSwapBuffers(hab,hwnd)

Description:

Swaps the front and back buffers of hwnd. This routine has no effect on windows attached to single buffered contexts. An implicit glFlush is done by pglSwapbuffers before it returns. Double buffered rendering is done when smooth animation between frames is desired. OpenGL commands issued after calling pglSwapBuffers are not issued until the buffer swap is complete.

Parameters:
HAB hab Handle to Anchor Block 
HWND hwnd Handle to Window whose buffers are to be swapped.

Return Values:

Notes:

When a window's buffers are swapped, the back buffer becomes the front, and the front buffer will become the back. The programmer can control which buffer is affected by OpenGL rendering calls through the use of glDrawBuffer.

Front and back buffers are not created for a window until it has been bound to an OpenGL context. This call has no effect on a PM window which has never been bound to an OpenGL context.

The window specified by hwnd does not CURRENTLY have to be bound to an OpenGL context, just needs to have been bound at some point. 


[ Previous | Next | Table Of Contents ]