Can't bind pbuffer to depth texture

Hi, i’m implementing shadow mapping and i get some problems related to the use of pbuffers.

If I use glCopyTexSubImage2D, my frame time raises from 12 to ~500 msecs with a 512x512 depth texture (~200msecs with 256x256).
If I use wglBindTexImageARB, it returns 0, and GetLastError returns a very huge number (3billion), so it doesn’t corresponds to any error listed on WGL_ARB_render_texture spec. I tried with front and back, left and right buffers with no result.

I have a 6600GT, and pbuffer params are the following (modified version of nvidia demos pbuffer class):
draw to pbuffer, support opengl, largest pbuffer, bind to depth texture, depth texture format=depth component, depth bits=24, texture target = 2d texture.
Pbuffer’s texture format is different from no_texture.

Do you know what can happen?

Well, finally i find what was the problem. I had to bind pbuffer to WGL_DEPTH_COMPONENT_NV instead of WGL_FRONT_LEFT.

The glCopyTexSubImage2D slowness issue is still there, but since I bind pbuffer directly to texture it’s not a problem anymore. Although, if someone has any idea of why this happens, tell me.

Don’t use pbuffer anymore, they are deprecated in favour of FBO.

Originally posted by jide:
Don’t use pbuffer anymore, they are deprecated in favour of FBO.
While deprecated, pbuffers AFAIK works on on a majority of even quite old cards. Can the same be said for FBO, even with recent (publicly released) drivers?

I’d also like to point out they are only deprecatde - not obsoleted as I saw someone state!

Originally posted by tamlin:
[b] [quote]Originally posted by jide:
Don’t use pbuffer anymore, they are deprecated in favour of FBO.
While deprecated, pbuffers AFAIK works on on a majority of even quite old cards. Can the same be said for FBO, even with recent (publicly released) drivers?

I’d also like to point out they are only deprecatde - not obsoleted as I saw someone state![/b][/QUOTE]Notice how I had used deprecated not obsolete :slight_smile:

You’re surelly plenty right tamlin ! However I haven’t used pbuffers at all. I just have began (a long time ago) to see their support. So I can’t say if they are so well supported. Anyway, the fact that they belong from the WM instead of the GL implies that it might be best supported (but not must be best).
And you’re also right because several people got bad things when using FBO (just like me), I think almost because they are young (the FBO not the people).