PDA

View Full Version : correct address of wglCreatePbufferARB



Hampel
09-28-2002, 02:44 AM
How do I get the address of wglCreatePbufferARB if I do not have a valid OpenGL rendering context (i.e. if I do not need an on-screen window)?

There seems to be no sample code around dealing with this case!?!?

vshader
09-28-2002, 03:10 AM
you have to create a temporary window just to get a gl context. it does not have to be visible. or you could use the desktop window, but i beleive that's considered kinda rude... after all, you don't own it.

Asgard
09-28-2002, 03:11 AM
You can't. You need to create a (maybe hidden) window, set a pixel format, create a rendering context, get the procedure address, and clean up everything again.

Bob
09-28-2002, 03:56 AM
If all you're after is an off screen renderer, then maybe you can try Mesa (http://www.mesa3d.org/) . It has a real off screen renderer, without the need of creating hidden windows and stuff like that.