nvidia pbuffer example

Hi

All the samples that use the pbuffer in the recent Nvidia opengl package are made under glut.
To change the rendering window, in glut they use :

void MakeGlutWindowCurrent()
{
static int glutWinId = glutGetWindow();
glutSetWindow( glutWinId );
}

How to do it under windows ?

thanks,

Bruno

On windows, to change rendering contexts, just call wglMakeCurrent( hdc, hglrc ) with the appropriate hdc and glrc.

This is effectively what the MakeGlutWindowCurrent() function does.

The pbuffer.MakeCurrent() function does the same thing - it just uses the hdc and hglrc associated with the pbuffer not the on-screen drawing surface.