LPDXUTCALLBACKISDEVICEACCEPTABLE

Application-defined callback function, called by DXUT to build an enumerated list of all possible devices. The framework then selects the best device for creation among this list. This callback function allows the application to prevent unwanted devices from being added to the list.

bool LPDXUTCALLBACKISDEVICEACCEPTABLE(
  D3DCAPS9 * pCaps,
  D3DFORMAT AdapterFormat,
  D3DFORMAT BackBufferFormat,
  bool bWindowed,
  void* pUserContext
);

Parameters

pCaps
[in] Pointer to the D3DCAPS9 structure of the device.
AdapterFormat
[in] Adapter surface format. See D3DFORMAT.
BackBufferFormat
[in] Back buffer format. See D3DPRESENT_PARAMETERS.BackBufferFormat.
bWindowed
[in] Indicates windowed mode. TRUE if the application runs windowed; FALSE if the application runs full-screen. See D3DPRESENT_PARAMETERS.Windowed.
pUserContext
[in] Pointer to a user-defined value which is passed to the callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function. The default value is NULL

Return Values

Program the application to return TRUE if the device settings are acceptable. If not, the application should return FALSE.

Remarks

This function's parameters describe a set of unique valid device settings that could be used to create a device. The application can examine and reject this set if desired.

All possible unique valid combinations of the following device settings are sent to this callback function:

After the application rejects the unwanted device settings combinations, DXUT picks the best of the remaining combinations and uses that best combination to create the device. Before creating the device, the framework calls LPDXUTCALLBACKMODIFYDEVICESETTINGS to allow the application to change any of the device creation settings.

Requirements

Header: Declared in Dxut.h.