wxb1

I'm working updating my graphics program to use the xna frame work and wanted to determine ALL the available z buffer formats for the adapter... I wanted to use the GraphicsDeviceCapabilities class but I cannot find a property of this class that gives me this information... what class should I use to determine this or what is the proper way to determine this...

Re: XNA Game Studio Express determine supported z buffer bit depth

Shawn Hargreaves - MSFT

You can use GraphicsAdapter.CheckDeviceFormat to see if a particular format is available.

If it was me I wouldn't bother, though. Just use Depth24, or Depth24Stencil8 if you need stencil, as those are supported by all modern cards.






Re: XNA Game Studio Express determine supported z buffer bit depth

wxb1

Ok... here is the command I'm using... why is it failing when 16 bit z-buffer is available

dwDeviceZBufferBitDepth = GraphicsAdapter.Adapters[AppInfo.CurrentDriver].CheckDeviceFormat(DeviceType.Hardware, SurfaceFormat.Depth16, ResourceUsage.none, QueryUsages.None, ResourceType.DepthStencilBuffer, DepthFormat.Depth16);