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 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
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.
Trait Implementations
sourceimpl Debug for InstanceCreateInfo
impl Debug for InstanceCreateInfo
Auto Trait Implementations
impl !RefUnwindSafe for InstanceCreateInfo
impl Send for InstanceCreateInfo
impl Sync for InstanceCreateInfo
impl Unpin for InstanceCreateInfo
impl !UnwindSafe for InstanceCreateInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more