Bewerken

Delen via


DD_GETFORMATDATA structure (d3dhal.h)

DirectX 8.0 and later versions only.

DD_GETFORMATDATA is the data structure pointed to by the lpvData field of DD_GETDRIVERINFODATA for DD_GETDRIVERINFO2DATA queries with the type D3DGDI2_TYPE_GETFORMAT.

Syntax

typedef struct _DD_GETFORMATDATA {
  DD_GETDRIVERINFO2DATA gdi2;
  DWORD                 dwFormatIndex;
  DDPIXELFORMAT         format;
} DD_GETFORMATDATA;

Members

gdi2

Specifies a DD_GETDRIVERINFO2DATA structure that contains the GetDriverInfo2 data.

dwFormatIndex

Specifies the index of the pixel format to return.

format

Receives the actual pixel format in a DDPIXELFORMAT structure.

Remarks

The runtime identifies the format to be returned with an integer index whose value varies between zero and one less than the number of supported formats reported earlier by the driver. How these indices are mapped to actual formats is left to the driver. However, each index must map uniquely to one supported format. The order in which the formats are reported is not significant.

When processing this GetDriverInfo2 request the driver should read the dwFormatIndex and map that to one of the supported formats (probably by using dwFormatIndex as an index into an array of DDPIXELFORMAT structures) and then copy that format into the format field of the DD_GETFORMATDATA field. The runtime guarantees that it only passes an index to the driver that is in the range zero to one less than the number of surface formats reported by the driver. The range of the index should be validated in the debug driver build.

DirectX 9.0 and later versions only.On input, the version of the DirectX runtime that is being used by the application is specified in the dwSize member of the DDPIXELFORMAT structure in format. This dwSize member is set to DD_RUNTIME_VERSION, which is 0x00000900 for DirectX 9.0.

Requirements

Requirement Value
Header d3dhal.h (include D3dhal.h)

See also

DDPIXELFORMAT

DD_GETDRIVERINFO2DATA

DD_GETDRIVERINFODATA