Getting the depth buffer's content

Hi,

I have a GeForce 7800 GTX 512 based card and was surprized to find out

that the driver for it states ( in the caps ) that there is no support for D3DFMT_D16_LOCKABLE .

I want to get the content of the depth buffer - How can I do that

Thanks' In Advance : Lior Canetti .




Answer this question

Getting the depth buffer's content

  • powertechit

    Hi,

    Thank's for the replay, but it does't help Me, because as You can

    understand from My first post, I have used that method and got the surface,

    but the LockRect() function failed because the surface was not in the D3DFMT_D16_LOCKABLE format, which by the Direct3D's documentation

    is the only depth / stencil lockable format, allthow

    D3DFMT_D32F_LOCKABLE ( which is allso not supported by any card I know of ) is allso in the enumeration .

    I will be happy to receive any help .

    Thank's In Advance : Lior Canetti .



  • tommyitvn

    You could easily retrieve the depth/stencil surface using the IDirect3DDevice9::GetDepthStencilSurface(&userDefinedSurface) or the Device.DepthStencilSurface. Then you can perform the necessary functions that you need to get the contents.

    You could lock the surface and read the contents etc...

    I hope this helps.
    Take care.


  • Apopka_Pilot

    Unfortunately you can’t do this with nVidia hardware. What do you want to do with the depth values Maybe there is another way to reach your aim.



  • Getting the depth buffer's content