Share via


Retrieving a Depth Buffer

The following C# code example demonstrates how to use the Device.DepthStencilSurface property to retrieve a Surface object that describes the depth-buffer surface owned by the device.

          [C#]
          

Device device = null;
Surface surface = null;

// Create the device.
.
.
.
    
surface = device.DepthStencilSurface;