pub struct Instance { /* private fields */ }
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,
debug_utils_user_data: Option<DebugUtilsMessengerUserData>,
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, debug_utils_user_data: Option<DebugUtilsMessengerUserData>, 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
If debug_utils_user_data
is Some
, then the validation layer is
available, so create a vk::DebugUtilsMessengerEXT
.
Trait Implementations§
source§impl Instance<Api> for Instance
impl Instance<Api> for Instance
unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>
unsafe fn create_surface( &self, display_handle: RawDisplayHandle, window_handle: RawWindowHandle ) -> Result<Surface, InstanceError>
unsafe fn destroy_surface(&self, surface: Surface)
unsafe fn enumerate_adapters(&self) -> Vec<ExposedAdapter<Api>>
Auto Trait Implementations§
impl !RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl !UnwindSafe for Instance
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more