Is there any quick method direct transfer Depth information into on texture without read back to main memory?
glCopyTexSubImage2D() with an internal format of GL_DEPTH_COMPONENT
I try to use pbufer and directly bind the pbuffer to a texture.
For RGB it works.
wglBindTexImageARB( pbuffer.hpbuffer, WGL_FRONT_LEFT_ARB )
however, when I use WGL_DEPTH_COMPONENT_NV
it fails.
Now I get it right
add WGL_BIND_TO_TEXTURE_DEPTH_NV, TRUE,
for the pixel format
and WGL_DEPTH_TEXTURE_FORMAT_NV, WGL_TEXTURE_DEPTH_COMPONENT_NV,
for the pbuffer attib
what’s the best way to do this on ati boards? use gl_arb_depth_texture somehow?