PDA

View Full Version : nvidia pbuffer example



Bruno
03-07-2001, 10:46 AM
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

wynn
03-07-2001, 12:28 PM
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.