Home -> IGraphicsDeviceEnumerator -> EnumerateDevices

Description

The EnumerateDevices method scans for available graphics devices on the system, which implement the required version of the underlying rendering API used by this renderer plugin. Although information on located devices is not returned directly by this method, after successfully completing, the available devices can be enumerated by calling other methods on the IGraphicsDeviceEnumerator object, such as GetAllDevices and GetPreferredDevice.

ImportantImportant

A successful call to this method means that the enumeration operation completed, not that at least one compatible device was found. It is valid for this method to return true while GetAllDevices returns an empty list, for example on a system without a compatible graphics driver, without the requested renderer API, or without a device compatible with the supplied EnumerationFlags. Applications should explicitly check FoundDevice or the returned device list before attempting to select or create a renderer from a device.

WarningWarning

Calling this method destroys any previously allocated IGraphicsDevice objects returned by this object, even if the same devices are located again during the enumeration process. Generally this method should only ever need to be called once, but this method is called after a previous successful call, it is the responsibility of the calling application to ensure any previously returned IGraphicsDevice references are not retained or accessed after this method is called.

Usage

SuccessToken EnumerateDevices(EnumerationFlags flags = EnumerationFlags::None);

Argument list

flags [DeviceType]
Optional flags to control the enumeration process

Return value

[SuccessToken]
True if the enumeration process completed, false if enumeration itself failed. A true result does not guarantee that any compatible devices were found.

See also