DirectX SDK

ID3DXContext::GetDeviceIndex

The ID3DXContext::GetDeviceIndex method returns the index of the hardware level for the device.

HRESULT GetDeviceIndex(
  LPDWORD pIndex,
  LPDWORD hwLevel
); 

Parameters

pIndex
After this method returns, the parameter points to a DWORD value matching the index of the specified device.
hwLevel
After this method returns, the parameter points to a DWORD value matching one of the pre-defined, hardware acceleration level constants. See Remarks.

Return Values

This method returns S_OK.

Remarks

The pre-defined, hardware acceleration level constants can be used where ever the actual device index is required. Direct3DX will resolve them to the actual index value. The defined hardware levels are convenient shortcuts to access various levels of acceleration. See the following table for a listing of these constants.

D3DX_HWLEVEL_REFERENCE
D3DX_HWLEVEL_2D
D3DX_HWLEVEL_RASTER
D3DX_HWLEVEL_TL
D3DX_DEFAULT

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::GetD3DDevice