DXUTMatchOptions
Describes match options for finding valid device settings in DXUTFindValidDeviceSettings. Each member of this structure corresponds to a setting described by the DXUTDeviceSettings structure.
Default values are used when a member is set to DXUTMT_IGNORE_INPUT. See Remarks.
typedef struct DXUTMatchOptions {
DXUT_MATCH_TYPE eAdapterOrdinal;
DXUT_MATCH_TYPE eDeviceType;
DXUT_MATCH_TYPE eWindowed;
DXUT_MATCH_TYPE eAdapterFormat;
DXUT_MATCH_TYPE eVertexProcessing;
DXUT_MATCH_TYPE eResolution;
DXUT_MATCH_TYPE eBackBufferFormat;
DXUT_MATCH_TYPE eBackBufferCount;
DXUT_MATCH_TYPE eMultiSample;
DXUT_MATCH_TYPE eSwapEffect;
DXUT_MATCH_TYPE eDepthFormat;
DXUT_MATCH_TYPE eStencilFormat;
DXUT_MATCH_TYPE ePresentFlags;
DXUT_MATCH_TYPE eRefreshRate;
DXUT_MATCH_TYPE ePresentInterval;
} DXUTMatchOptions, *LPDXUTMatchOptions;
Members
- eAdapterOrdinal
- Match type for the display adapter ordinal. If set to DXUTMT_IGNORE_INPUT, then the default value is D3DADAPTER_DEFAULT.
- eDeviceType
- Match type for the enumerated type of the device. See D3DDEVTYPE. If set to DXUTMT_IGNORE_INPUT, then the default value is D3DDEVTYPE_HAL.
- eWindowed
- Match type for the windowed or full-screen mode. See D3DPRESENT_PARAMETERS.Windowed. If set to DXUTMT_IGNORE_INPUT, then the default value is windowed mode (TRUE).
- eAdapterFormat
- Match type for the adapter surface format. See D3DFORMAT. If set to DXUTMT_IGNORE_INPUT, then the default value is the desktop display mode, or D3DFMT_X8R8G8B8 if the desktop display mode is less than 32 bits.
- eVertexProcessing
- Match type for the vertex processing flags D3DCREATE_HARDWARE_VERTEXPROCESSING, D3DCREATE_MIXED_VERTEXPROCESSING, or D3DCREATE_SOFTWARE_VERTEXPROCESSING. See D3DCREATE. If set to DXUTMT_IGNORE_INPUT, then the default value is D3DCREATE_HARDWARE_VERTEXPROCESSING.
- eResolution
- Match type for the display mode resolution. See D3DDISPLAYMODE. If set to DXUTMT_IGNORE_INPUT, then the default value is 640 x 480 pixels for windowed mode, or the desktop resolution for full-screen mode.
- eBackBufferFormat
- Match type for the back buffer format. See D3DPRESENT_PARAMETERS. If BackBufferFormat is set to DXUTMT_IGNORE_INPUT, then the default value is to match the adapter format.
- eBackBufferCount
- Match type for the number of back buffers. See D3DPRESENT_PARAMETERS. If BackBufferCount is set to DXUTMT_IGNORE_INPUT, then the default value is 2 for triple buffering.
- eMultiSample
- Match type for the quality level. See D3DPRESENT_PARAMETERS.MultiSampleQuality. If set to DXUTMT_IGNORE_INPUT, then the default value is to disable multisampling (MultiSampleQuality = 0).
- eSwapEffect
- Match type for the swap effect. See D3DPRESENT_PARAMETERS.SwapEffect. If set to DXUTMT_IGNORE_INPUT, then the default value is D3DSWAPEFFECT_DISCARD.
- eDepthFormat
- Match type for the depth format of the automatic depth-stencil surface that the device will create. See D3DPRESENT_PARAMETERS.AutoDepthStencilFormat. If both eDepthFormat and eStencilFormat are set to DXUTMT_IGNORE_INPUT, then the default value is D3DFMT_D16 if the backbuffer format is 16 bits or less, or D3DFMT_D32 otherwise.
- eStencilFormat
- Match type for the stencil format of the automatic depth-stencil surface that the device will create. See D3DPRESENT_PARAMETERS.AutoDepthStencilFormat. If both eDepthFormat and eStencilFormat are set to DXUTMT_IGNORE_INPUT, then the default value is D3DFMT_D16 if the backbuffer format is 16 bits or less, or D3DFMT_D32 otherwise.
- ePresentFlags
- Match type for the presentation parameters flags. See D3DPRESENT_PARAMETERS.Flags. If set to DXUTMT_IGNORE_INPUT, then the default value is D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL.
- eRefreshRate
- Match type for the rate at which the display adapter refreshes the screen. See D3DPRESENT_PARAMETERS.FullScreen_RefreshRateInHz. If set to DXUTMT_IGNORE_INPUT, then the default value is 0, indicating windowed mode.
- ePresentInterval
- Match type for the presentation interval. See D3DPRESENT_PARAMETERS.PresentationInterval. If set to DXUTMT_IGNORE_INPUT, then the default value is D3DPRESENT_INTERVAL_IMMEDIATE for windowed mode, or D3DPRESENT_INTERVAL_DEFAULT for full-screen mode.
Remarks
For each member of this structure, match options are specified using the constant values of the DXUT_MATCH_TYPE enumeration, as in the following code example.
matchOptions.eResolution = DXUTMT_CLOSEST_TO_INPUT;
To use default device settings instead, use the DXUTMT_IGNORE_INPUT flag as follows:
matchOptions.eResolution = DXUTMT_IGNORE_INPUT;
See Also
DXUT_MATCH_TYPE, DXUTFindValidDeviceSettings, DXUTDeviceSettings