Platform SDK: DirectX

D3DXMakeSurfaceFormat

The D3DXMakeSurfaceFormat function determines the surface format corresponding to a given DDPIXELFORMAT structure.

D3DX_SURFACEFORMAT D3DXMakeSurfaceFormat(
  DDPIXELFORMAT* pddpf
); 

Parameters

pddpf
A pointer to a DDPIXELFORMAT structure.

Return Values

A member of the D3DX_SURFACEFORMAT enumerated type corresponding to the pddpf parameter.

Remarks

The D3DXMakeSurfaceFormat function will return D3DX_SF_UNKNOWN if the pddpf parameter is NULL or is an unrecognized pixel format.

Requirements

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

See Also

D3DXMakeDDPixelFormat