pub struct InstanceCreateInfo {
pub flags: InstanceCreateFlags,
pub application_name: Option<String>,
pub application_version: Version,
pub engine_name: Option<String>,
pub engine_version: Version,
pub max_api_version: Option<Version>,
pub enabled_layers: Vec<String>,
pub enabled_extensions: InstanceExtensions,
pub debug_utils_messengers: Vec<DebugUtilsMessengerCreateInfo>,
pub enabled_validation_features: Vec<ValidationFeatureEnable>,
pub disabled_validation_features: Vec<ValidationFeatureDisable>,
pub _ne: NonExhaustive,
}Expand description
Parameters to create a new Instance.
Fields§
§flags: InstanceCreateFlagsAdditional properties of the instance.
The default value is empty.
application_name: Option<String>A string of your choice stating the name of your application.
The default value is None.
application_version: VersionA version number of your choice specifying the version of your application.
The default value is zero.
engine_name: Option<String>A string of your choice stating the name of the engine used to power the application.
engine_version: VersionA 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.
enabled_layers: Vec<String>The layers to enable on the instance.
The default value is empty.
enabled_extensions: InstanceExtensionsThe extensions to enable on the instance.
You only need to enable the extensions that you need. If the extensions you specified require additional extensions to be enabled, they will be automatically enabled as well.
The default value is InstanceExtensions::empty().
debug_utils_messengers: Vec<DebugUtilsMessengerCreateInfo>Creation parameters for debug messengers, to use during the creation and destruction of the instance.
The debug messengers are not used at any other time,
DebugUtilsMessenger should be used for
that.
If this is not empty, the ext_debug_utils extension must be set in enabled_extensions.
The default value is empty.
enabled_validation_features: Vec<ValidationFeatureEnable>Features of the validation layer to enable.
If not empty, the
ext_validation_features
extension must be enabled on the instance.
disabled_validation_features: Vec<ValidationFeatureDisable>Features of the validation layer to disable.
If not empty, the
ext_validation_features
extension must be enabled on the instance.
_ne: NonExhaustiveImplementations§
Source§impl InstanceCreateInfo
impl InstanceCreateInfo
Sourcepub fn application_from_cargo_toml() -> InstanceCreateInfo
pub fn application_from_cargo_toml() -> InstanceCreateInfo
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.