DirectX SDK

ID3DXContext::GetNumBits

The ID3DXContext::GetNumBits method returns values describing the pixel format of the DirectDrawSurface objects encapsulated by a context object.

HRESULT GetNumBits(
  LPDWORD colorBits,
  LPDWORD depthBits,
  LPDWORD alphaBits,
  LPDWORD stencilBits
); 

Parameters

colorBits
A pointer to the color depth of the current display mode.
depthBits
A pointer to the bit depth of the z-buffer.
alphaBits
A pointer to the bit depth of the alpha buffer
stencilBits
A pointer to the bit depth of the stencil buffer.

Return Values

This method returns S_OK.

Remarks

The stencilBits parameter specifies how many bits are reserved with each pixel of the z-buffer for stencil information.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxcore.h.
  Library: Use d3dx.lib.

See Also

ID3DXContext::GetZBuffer