|
EngineCreateOptions Class |
Options that are user to initialize Ab4d.SharpEngine.
When using SharpEngineSceneView, then EngineCreateOptions can be changed by using CreateOptions property.
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.CommonAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public class EngineCreateOptions
The EngineCreateOptions type exposes the following members.
Constructors Properties | Name | Description |
---|
| AdditionalValidationFeatures |
AdditionalValidationFeatures can be set to an array of ValidationFeatureEnableEXT enum values that specify additional validation features that will be enabled by the engine
(if VK_EXT_validation_features instance extension is supported).
The EnableStandardValidation must be true and supported for additional validation to work.
|
| ApplicationName |
The name of the application that is using SharpEngine. If not manually set, then the name is set from the name of the entry assembly.
|
| ApplicationVersion |
The version of the that is using SharpEngine. If not manually set, then the version is set from the version of the entry assembly.
|
| CreateDebugDirectXDevice |
Gets or sets a Boolean that specifies if the DirectX 11 device is created with enabled debug flag (only when DirectX is used for shared texture). Default value is false.
|
| CustomDeviceId |
When set to a non-zero value, then the PhysicalDevice with this DeviceId will be selected as the used device.
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).
When setting this value, the DeviceSelectionType is automatically set to CustomDeviceId.
|
| CustomDeviceSelectionFunc |
CustomDeviceSelectionFunc is a Func that takes list of all PhysicalDeviceDetails and SurfaceKHR and returns the selected PhysicalDevice.
|
| CustomVulkanLoaderLibrary |
CustomVulkanLoaderLibrary can specify a custom library name (can also include file path) that will be used as Vulkan Loader library.
|
| DesiredDeviceExtensionNames |
A list of Device extension names that will be enabled if the extensions are available when creating a device.
Any of the specified extensions is not available, then no exception will be thrown (only a log message with warning level will be written).
|
| DesiredInstanceExtensionNames |
A list of Instance extension names that will be enabled if the extensions are available when creating an instance.
Any of the specified extensions is not available, then no exception will be thrown (only a log message with warning level will be written).
|
| DeviceSelectionType |
DeviceSelectionType defines which device (graphics card) will be selected by the SharpEngine.
Default value is DefaultDevice.
|
| EnableShaderDebugPrintf |
Gets or sets a Boolean that specifies if using debugPrintfEXT function in shader is enabled. Default value is false. Enabling this feature can slow down initialization and rendering.
|
| EnableStandardValidation |
Gets or sets a Boolean that specified is Vulkan standard validation is enabled.
When enabled then a Vulkan validation layer checks and validates each vulkan call and writes detailed information about the problem.
When disabled then this layer is skipped for better performance but in case of an error the application can crash without any additional problem information.
It is recommended to enable standard validation during development and disable it in production to improve performance (in case of problems it is good to be still able to start the application with standard validation enabled).
Default value is false.
|
| EnableSurfaceSupport |
EnableSurfaceSupport is by default set to true and indicates that a Vulkan surface can be used as the target for rendering (usually this is used when rendering to a window).
When rendering only to a bitmap or when using shared texture, then this value can be set to false.
|
| EnableVulkanLineRasterization |
Gets or sets a Boolean that specifies if Vulkan's line rasterization should be enabled.
When true (false by default) than LineRasterizationExtension will be enabled (when supported) and LineRasterizationMode can be set to a mode that uses V. This enables rendering thick lines with Vulkan's driver implementation.
|
| EnableVulkanStippleLineRasterization |
Gets or sets a Boolean that specifies if Vulkan's line rasterization with support for stippled lines (lines with pattern) should be enabled.
When true (false by default) then this requires slightly more complex initialization.
|
| EnsureCameraOnInitialize |
When true (by default) and if there is no camera defined when rendering the first frame, then a new TargetPositionCamera is created
with Heading and Attitude set to 0, TargetPosition set to the center of Scene's Bounding box and Distance set to double the distance of the bounding box diagonal.
A warning log message is be written to log when a camera is created in this case.
When false and if no camera is defined, then Identity matrix is used for ViewProjection matrix.
|
| PreferredSwapChainImagesCount |
PreferredSwapChainImagesCount can be used to set the preferred number of swap chain images. The actually used number may be different and is based on the surface min and max possible values. Default value is 2.
|
| RequiredDeviceExtensionNames |
A list of additional Device extension names that will be enabled when creating a device.
Any of the specified extensions is not available, then an exception is thrown when creating the VulkanDevice.
|
| RequiredInstanceExtensionNames |
A list of Instance extension names that will be enabled when creating an instance.
Any of the specified extensions is not available, then an exception is thrown when creating the Instance.
|
| SemaphoresExportableType |
This property can be used to create exportable Vulkan Semaphores to synchronize rendering with external UI framework.
Semaphores can be retrieved by GetImageAvailableSemaphore and GetRenderFinishedSemaphore methods.
By default this property is set to None which does not allow exporting the semaphores.
|
| UseDeviceLocalHostVisibleMemoryType |
Gets or sets a Boolean that specified if DeviceLocal and HostVisible memory type is used (when available).
This is also called Resizable BAR or ReBAR on some platforms. Default value is true.
|
| VulkanApiVersion |
When not null it defines the Vulkan API version that is used to create the Vulkan Instance. The version must be bigger or equal to MinRequiredVulkanApiVersion.
|
TopFields | Name | Description |
---|
| SetupRequestedDeviceFeatures |
Gets or sets a Func that gets PhysicalDeviceDetails (provides information which features are supported by the device) and PhysicalDeviceFeatures (with features enabled by SharpEngine) and returns a PhysicalDeviceFeatures that will be passed to the creation of the device.
Before enabling features users need to check if the feature is actually supported by the device (by checking the PhysicalDeviceDetails.Features).
|
TopSee Also