logo
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 and khr_portability_enumeration extension is not preset this field will be ignored and the ENUMERATE_PORTABILITY_KHR flag will not be set.
  • If true and khr_portability_enumeration extension is present, khr_portability_enumeration extension will automatically be enabled.
_ne: NonExhaustive

Implementations

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.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.