DirectX SDK

D3DXMakeDDPixelFormat

The D3DXMakeDDPixelFormat function returns a DDPIXELFORMAT structure based on the Direct3DX surface format requested.

HRESULT D3DXMakeDDPixelFormat(
  D3DX_SURFACEFORMAT d3dxFormat,
  DDPIXELFORMAT* pddpf
); 

Parameters

d3dxFormat
A pointer to a member of the D3DX_SURFACEFORMAT enumerated type; the surface format.
pddpf
A pointer to a DDPIXELFORMAT structure which returns describing a pixel format matching the given surface format.

Return Values

If the function succeeds, the return value is S_OK.

If the function fails, the return value may be one of the following values:

D3DXERR_NULLPOINTER
D3DXERR_INVALIDPARAMETER

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

D3DXMakeSurfaceFormat