 |
EngineCreateOptionsDeviceSelectionTypes Enumeration |
Namespace: Ab4d.SharpEngine.CommonAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntaxpublic enum DeviceSelectionTypes
Members| Member name | Value | Description |
|---|
| DefaultDevice | 0 |
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 this is set up in the Graphics settings: you add your application's exe to the list and then in options select High performance).
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 a 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.
In this case the SharpEngine will switch to WritableBitmap as the PresentationType.
When SharpEngine is not using a shared texture but renders to its own part of the window (for example using OverlayTexture in WPF), then any graphics card can be used.
|
| PrimarySystemDevice | 1 |
This is the same as DefaultDevice.
|
| SecondarySystemDeviceWhenAvailable | 2 |
On system with multiple devices, the secondary graphic card is selected.
Otherwise, the default device is used.
See comments with DefaultDevice for more info.
|
| BestPhysicalDevice | 3 |
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 than using BestPhysicalDevice (especially in case of large viewports).
This can be solved by starting the application with dedicated graphic card
(on Windows this is set up in the Graphics settings: you add your application's exe to the list and then in options select High performance).
When SharpEngine is not using a shared texture but renders to its own part of the window (for example using OverlayTexture in WPF), then any graphics card can be used.
|
| CustomDeviceId | 4 |
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 the CustomDeviceId property is set by the user.
|
| CustomDeviceSelectionFunc | 5 |
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 the CustomDeviceSelectionFunc property is set by the user.
|
| PreferDedicatedGpu | 6 |
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 than the integrated graphics card.
When not available, then default system device is used.
See comments with DefaultDevice for information about using non-default device.
|
| PreferIntegratedGpu | 7 |
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 than the dedicated graphics card.
When not available, then default system device is used.
See comments with DefaultDevice for information about using non-default device.
|
| PreferVirtualGpu | 8 |
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.
|
| PreferCpuDevice | 9 |
When available, use graphics device that implemented as a software rendering device.
When not available, then default system device is used.
See comments with DefaultDevice for information about using non-default device.
|
| PreferAmdDevice | 4,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.
|
| PreferNVIDIADevice | 4,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.
|
| PreferArmDevice | 5,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.
|
| PreferIntelDevice | 32,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