![]() |
![]() |
![]() |
Application-defined callback function, called by the sample framework 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.
Syntax
typedef bool (CALLBACK *LPDXUTCALLBACKISDEVICEACCEPTABLE)(
D3DCAPS9 *pCaps, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, bool bWindowed );
Parameters
- pCaps
- [in] 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.
Return Value
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:
- DeviceType member of pCaps.
- AdapterOrdinal member of pCaps.
- AdapterFormat
- BackBufferFormat
- bWindowed
After the application rejects the unwanted device settings combinations, the sample framework 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.
Prototype Information
Header dxut.h Import library None Minimum operating systems Windows 98
See Also
Choosing the Best Device Settings, Controlling the Device Selection Dialog