I know my machine supports this because I tried the nVidia demo ‘Simple shadow mapping’. But wglCreatePbufferARB() always returns NULL in my project so my question is if there is ANYTHING I have to enable/disable in order to successfully create a pixel buffer with the above attributes?
You may need to provide more information like bit depth for color buffer and so on. I tried many different things to get this function working. My problem was that I was using somethings incorrectly… took me a while to debug it.
I can send you my code if you want and you can update it.
I create the pixel buffer in the exact same way as the demo does. But if I clear aiAttributes[] to zero between wglChoosePixelFormatARB() and wglCreatePbufferARB() it returns a valid handle. But I need the depth texture attributes to be set for my project. I’m totally clueless on how to solve this thing
For those of you who are interested. My problem is solved with the help from nVidia. I had to call wglGetExtensionsStringARB() before pbuffer creation. I didn’t know that this function does more than returning the supported extensions
That sounds very odd
Of course you should call this function to see if WGL_ARB_pbuffer extension is supported in a shipping application, but it should work otherwise too. They must have done some sort of hack in the drivers I suppose.
Mmh, you are right. And this is nowhere documented.
If I don’t specify WGL_DEPTH_TEXTURE_FORMAT_NV and don’t call wglGetExtensionsStringARB() I also get a pbuffer. Seems that only this flag needs the call to wglGetExtensionsStringARB(). I don’t under stand it,… BUT IT WORKS
hm odd… drivers look little crappy so far then… at least your problem is solved. my one isn’t (the crash on wgl_arb_render_texture) but i call the getextensionstring yet
have fun…