Hello,
I’ve been fiddling around with WGL extensions lately (and also GLX extensions under Linux), mostly pbuffers and render-to-texture, and I have a question regarding the initialization of these extensions.
AFAIK, under Linux glXGetProcAddress is context independent, whereas wglGetProcAddress is not. So under Windows, every render context needs its own extension procedure table. So far so good.
But are all the WGL extensions also context dependent? Let’s take WGL_ARB_pixel_format for example. It’s kind of sick that you have to create a rendering context in order to query the extension procedures for it (since the extension is actually meant to be used for creating a rendering context). Since it’s perfectly fine with WGL_ARB_pixel_format to create a dummy window + RC and then destroy it after getting the procedures, I guess that WGL_ARB_pixel_format is context independent. But does that hold true for the other WGL extensions as well?
What I’d like to do is, create a dummy window + RC at engine startup, initialize the WGL extension procedure table, destroy the dummy window and context again and be done with it.
But is that legal?
Thanks for any advice.