Home -> IGraphicsDeviceEnumerator -> GetPreferredDevice
Description
The GetPreferredDevice method returns the IGraphicsDevice object in the current filtered device set which, on balance, is considered to be the best option for high performance rendering tasks. If there is at least one device in the set of filtered devices, as returned by the GetFilteredDevices method, this method will always return a device. If the filtered device set is empty, this method will return nullptr.
Warning
Because EnumerateDevices can complete successfully without locating any compatible devices, applications should treat a nullptr return from this method as a normal result that must be handled.
Usage
IGraphicsDevice* GetPreferredDevice() const;
Return value
- [IGraphicsDevice*]
- The best device for high performance rendering in the filtered device set, or nullptr if the filtered device set is empty.