I am trying to get a pbuffer working and I am a litte confused by wglGetExtensionsStringEXT vs. wglGetExtensionsStringARB.
On my nVidia GeForce 4 with OpenGL v1.4 drivers, wglGetExtensionsStringARB consistently returns NULL whereas wglGetExtensionsStringEXT returns a valid extension list. However, wglGetExtensionsStringEXT’s list includes WGL_ARB_pbuffer instead of WGL_EXT_pbuffer! Now, which is “safest” to use across platforms/implementations between wglCreatePbufferEXT or wglCreatePbufferARB?
This does not seem consistent! I would think that:
wglGetExtensionsStringEXT would return:
WGL_EXT_pbuffer, WGL_EXT_pixel_format, etc. and would indicate its safe to use:
wglCreatePbufferEXT, wglGetPbufferDCEXT, etc.
wglGetExtensionsStringARB would return:
WGL_ARB_pbuffer, WGL_ARB_pixel_format, etc. and would indicate its safe to use:
wglCreatePbufferARB, wglGetPbufferDCARB, etc.
Instead I am left with using wglGetExtensionsStringEXT to search for WGL_ARB_pbuffer and WGL_ARB_pixel_format. But do I use wglCreatePbufferARB or wglCreatePbufferEXT in wglGetProcAddress, for example??
If there is an ARB version of an extension I would always prefer it over an EXT version.
That said, your question should be answered .
Agreed… I guess my questions really are:
Why does wglGetExtensionsStringARB return NULL whilst wglGetExtensionStringEXT returns the ARB extensions?
Given that wglGetExtensionStringEXT returns the ARB extensions, should I use the ARB version of the function (because the extension listed is ARB) or the EXT version because the method of getting the extension list (wglGetExtensionStringEXT) was EXT?
I don’t know why the ARB version doesn’t give you any results, but it seems like a very unsafe practice to use an extension that isn’t explicitly exported. Because of your situation, I’d suggest getting both the ARB and the EXT strings, and looking in both places. If you find the ARB extension in either place use that, and if you don’t find it but you do find the EXT extension use that instead.
>>Why does wglGetExtensionsStringARB return NULL whilst wglGetExtensionStringEXT returns the ARB extensions?<<
I think someone was having a similar issue and the solution was that some other call had to be made otherwise wglGetExtensionsStringARB returns null.
I usually just attempt to load the function exports instead of searching the extension string, so I have not observed this problem.
Are you sure you´re doing the dummy window stuff correct?
First off, thanks for all the assistance! Yes I am sure I am setting everything up properly. I also downloaded NVSDK from nVidia’s site and compiled nVidia’s sample code. Specifically the “pbuffer_to_texture_rectangle” example. Even their example fails because it calls wglGetExtensionsStringARB which returns NULL! So even their sample code exhibits the same problem I am facing. I have also now tried several video driver versions on my gf4 and have also tried on another machine with a gf2mx. Same problem across the board.
Oh well… I will parse both wglGetExtensionsStringsARB and EXT to detect what I need. So odd.