pub struct Instance { /* private fields */ }
Available on crate feature
vulkan
only.Implementations§
source§impl Instance
impl Instance
pub fn expose_adapter(&self, phd: PhysicalDevice) -> Option<ExposedAdapter<Api>>
source§impl Instance
impl Instance
pub fn required_extensions( entry: &Entry, _driver_api_version: u32, flags: InstanceFlags ) -> Result<Vec<&'static CStr>, InstanceError>
sourcepub unsafe fn from_raw(
entry: Entry,
raw_instance: Instance,
driver_api_version: u32,
android_sdk_version: u32,
extensions: Vec<&'static CStr>,
flags: InstanceFlags,
has_nv_optimus: bool,
drop_guard: Option<DropGuard>
) -> Result<Self, InstanceError>
pub unsafe fn from_raw( entry: Entry, raw_instance: Instance, driver_api_version: u32, android_sdk_version: u32, extensions: Vec<&'static CStr>, flags: InstanceFlags, has_nv_optimus: bool, drop_guard: Option<DropGuard> ) -> Result<Self, InstanceError>
Safety
raw_instance
must be created fromentry
raw_instance
must be created respectingdriver_api_version
,extensions
andflags
extensions
must be a superset ofrequired_extensions()
and must be created from the same entry, driver_api_version and flags.android_sdk_version
is ignored and can be0
for all platforms besides Android