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 function_pointers: Option<FunctionPointers<Box<dyn Loader>>>,
    pub max_api_version: Option<Version>,
    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::none().

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.

function_pointers: Option<FunctionPointers<Box<dyn Loader>>>

Function pointers loaded from a custom loader.

You can use this if you want to load the Vulkan API explicitly, rather than using Vulkano’s default.

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.

_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.