View Full Version : WGL_ARB_pixel_format and wglGetProcAddress

04-25-2003, 02:00 AM
I want to create a rendering context using WGL_ARB_pixel_format. Fot that, I need to load the functions with wglGetProcAddress.
But the wglGetProcAddress works only if A call it after creating the rendering context, and I need these functions to create the rendering context !
What can I do in this case ?

04-25-2003, 03:37 AM
Create a dummy (and possibly hidden) window+rendering context, make sure the rendering context is supplied by the ICD (so that you can get the WGL_ARB_pixel_format of the hardware-accelerated driver), retrieve the procedure entry points, destroy the dummy window+rendering context, and finally use the extension procedure.

04-25-2003, 05:05 AM
I was thinking about this solution, but I wandered if the wasn't sonething less complicated and more direct...
Thanks, I will try this !

04-25-2003, 07:09 AM
Unfortunately, using a dummy context is the only way to do this. WGL_ARB_pixel_format is enabled by the driver, but the driver isn't loaded until a rendering context has been created.