IDirect3D9::CheckDeviceFormat

This is a method for IDirect3D9. This determines whether a surface format is available as a specified resource type and can be used as a texture, depth-stencil buffer, or render target, or any combination of the three, on a device representing this adapter.

Syntax
HRESULT CheckDeviceFormat( UINT Adapter,  D3DDEVTYPE DeviceType,  D3DFORMAT AdapterFormat,  DWORD Usage,  D3DRESOURCETYPE RType,  D3DFORMAT CheckFormat );

Parameters
Adapter -  Ordinal number identifying the adapter to query. It will most likely be D3DADAPTER_DEFAULT.

 DeviceType -  A member of D3DDEVTYPE that denotes the device type.

 AdapterFormat -  A member of D3DDEVTYPE that denotes the display mode.

 Usage -  Options for the surface. Combination of D3DUSAGE and D3DUSGE_QUERY. See info on D3DUSAGE page.

 RType -  Resource type requested for use with the queried format. A member of D3DRESOURCETYPE.

 CheckFormat -  Format of the surfaces that may used. A member of D3DFORMAT.

Return Values
If it succeeds, it will return D3D_OK. D3DERR_INVALIDCALL is returned if Adapter equals or exceeds the number of display adapters in the system, or if DeviceType is unsupported. D3DERR_NOTAVAILABLE is returned if the format is not acceptable to the device for this usage.

Requirements
 Header -  d3d9.h

 Library -  d3d9.lib