In DirectX 2, the DirectDraw HEL can create z-buffers for use by Direct3D or other 3D rendering software. The HEL supports both 16- and 32-bit z-buffers. The DirectDraw device driver for a 3D-accelerated display card can permit the creation of z-buffers in display memory by exporting the surface capability DDSCAPS_ZBUFFER. It should also specify the z-buffer depths it supports using the dwZBufferBitDepths member of the DDCAPS structure.
Z-buffers can be cleared using the IDirectDrawSurface::Blt method. A new DirectDraw blit flag (DDBLT_DEPTHFILL) has been defined to indicate that the blit clears z-buffers. If this flag is specified, the DDBLTFX structure passed to the IDirectDrawSurface::Blt method should have its dwFillDepth member set to the required z-depth. If the DirectDraw device driver for a 3D-accelerated display card is designed to provide support for z-buffer clearing in hardware, it should export the capability flag DDCAPS_BLTDEPTHFILL and should have code to handle DDBLT_DEPTHFILL blits. The destination surface of a depth fill blit must be a z-buffer.
Note The actual interpretation of a depth value is 3D-renderer specific.