Click or drag to resize
Ab4d.SharpEngine logo

EngineCreateOptionsDeviceSelectionTypes Enumeration

DeviceSelectionTypes enum defines possible values for the DeviceSelectionType property.

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public enum DeviceSelectionTypes
Members
Member nameValueDescription
DefaultDevice0 Use default device (graphics card) that is selected by the operating system and that is used for other UI elements of the application. On laptop with multiple devices the operating system usually selects the integrated graphics card to extend battery life. To use a dedicated graphics card usually requires some changes in the system settings (on Windows adding application to a list is Graphics settings section). When using shared texture to compose the rendered 3D scene with the UI framework of the application, it is highly recommended to use default device because this way the application's UI will use the same device and therefore the texture could be shared. If SharpEngine uses different device than the application, then the rendered scene will need to be copied to main memory and then to the device that is used by the application. When SharpEngine is not using shared texture but renders to its own part of the window, then any graphics card can be used.
PrimarySystemDevice1 This is the same as DefaultDevice.
SecondarySystemDeviceWhenAvailable2 On system with multiple devices, the secondary graphic card is selected. Otherwise the default device is used. See comments with DefaultDevice for more info.
BestPhysicalDevice3 Use the best physical device that is available on the system. On laptop with multiple devices this is usually the dedicated graphics card. This selection type should be used with caution when sharing the rendered image with the UI framework of the application. The problem occurs when the application is started with the integrated graphics card and SharpEngine is using a dedicated graphics card. In this case the rendered image needs to be copied to main memory and then to integrated graphics card. Because of this using DefaultDevice may be faster then using BestPhysicalDevice (especially in case of large viewports). This can be solved by stating the application with dedicated graphic card.
CustomDeviceId4 Use the device with the id that is specified to the CustomDeviceId property. If the device with this Id does not exist, then a default device will be used (a Warn log message will be written about that). This mode is automatically selected when CustomDeviceId is set.
CustomDeviceSelectionFunc5 Use the device that is returned by the CustomDeviceSelectionFunc callback. If the Func returns null, then the DefaultDevice will be used. This mode is automatically selected when CustomDeviceSelectionFunc is set.
PreferDedicatedGpu6 When available, use graphics card that is separate from the main system processor (CPU) and has its own memory. Such graphics card is more powerful but uses more power then the integrated graphics card. When not available, then default system device is used. See comments with DefaultDevice for information about using non-default device.
PreferIntegratedGpu7 When available, use graphics card that is integrated into the main system processor (CPU) and use system memory. Such graphics card is slower but uses less power then the dedicated graphics card. When not available, then default system device is used. See comments with DefaultDevice for information about using non-default device.
PreferVirtualGpu8 When available, use graphics card that is defined as a virtual node in a virtualization environment. When not available, then default system device is used. See comments with DefaultDevice for information about using non-default device.
PreferCpuDevice9 When available, use graphics device that implemented as software rendering device. When not available, then default system device is used. See comments with DefaultDevice for information about using non-default device.
PreferAmdDevice4,098 Use AMD's graphics card when it is available, otherwise default system device is used. See comments with DefaultDevice for information about using non-default device.
PreferNVIDIADevice4,318 Use NVIDIA's graphics card when it is available, otherwise default system device is used. See comments with DefaultDevice for information about using non-default device.
PreferArmDevice5,045 Use ARM's graphics card when it is available, otherwise default system device is used. See comments with DefaultDevice for information about using non-default device.
PreferIntelDevice32,902 Use Intel's graphics card when it is available, otherwise default system device is used. See comments with DefaultDevice for information about using non-default device.
See Also