Struct vulkano::instance::InstanceCreateInfo
source · [−]pub struct InstanceCreateInfo {
pub application_name: Option<String>,
pub application_version: Version,
pub enabled_extensions: InstanceExtensions,
pub enabled_layers: Vec<String>,
pub engine_name: Option<String>,
pub engine_version: Version,
pub max_api_version: Option<Version>,
pub enumerate_portability: bool,
pub _ne: NonExhaustive,
}
Expand description
Parameters to create a new Instance
.
Fields
application_name: Option<String>
A string of your choice stating the name of your application.
The default value is None
.
application_version: Version
A version number of your choice specifying the version of your application.
The default value is zero.
enabled_extensions: InstanceExtensions
The extensions to enable on the instance.
The default value is InstanceExtensions::empty()
.
enabled_layers: Vec<String>
The layers to enable on the instance.
The default value is empty.
engine_name: Option<String>
A string of your choice stating the name of the engine used to power the application.
engine_version: Version
A version number of your choice specifying the version of the engine used to power the application.
The default value is zero.
max_api_version: Option<Version>
The highest Vulkan API version that the application will use with the instance.
Usually, you will want to leave this at the default.
The default value is Version::HEADER_VERSION
, but if the
supported instance version is 1.0, then it will be 1.0.
enumerate_portability: bool
Enumerate devices that support VK_KHR_portability_subset
.
With this enabled, devices that use non-conformant vulkan implementations can be enumerated. (ex. MoltenVK)
The default value is false.
Notes
- If
true
andkhr_portability_enumeration
extension is not preset this field will be ignored and theENUMERATE_PORTABILITY_KHR
flag will not be set. - If
true
andkhr_portability_enumeration
extension is present,khr_portability_enumeration
extension will automatically be enabled.
_ne: NonExhaustive
Implementations
sourceimpl InstanceCreateInfo
impl InstanceCreateInfo
sourcepub fn application_from_cargo_toml() -> Self
pub fn application_from_cargo_toml() -> Self
Returns an InstanceCreateInfo
with the application_name
and application_version
set
from information in your crate’s Cargo.toml file.
Panics
- Panics if the required environment variables are missing, which happens if the project wasn’t built by Cargo.