Struct gfx_backend_vulkan::Instance [−][src]
pub struct Instance { pub raw: Arc<RawInstance>, pub extensions: Vec<&'static CStr>, pub entry: Entry, }
Fields
raw: Arc<RawInstance>
extensions: Vec<&'static CStr>
Supported extensions of this instance.
entry: Entry
Implementations
pub fn create_surface_from_xcb(
&self,
connection: *mut xcb_connection_t,
window: xcb_window_t
) -> Surface
pub fn create_surface_from_wayland(
&self,
display: *mut c_void,
surface: *mut c_void
) -> Surface
pub fn required_extensions(
entry: &Entry,
driver_api_version: Version
) -> Result<Vec<&'static CStr>, UnsupportedBackend>
Safety
raw_instance
must be created using at least the extensions provided by Instance::required_extensions()
and the layers provided by Instance::required_extensions()
.
driver_api_version
must match the version used to create raw_instance
.
extensions
must match the extensions used to create raw_instance
.
raw_instance
must be manually destroyed after gfx-hal Instance has been dropped.
pub unsafe fn adapter_from_raw(
&self,
raw_physical_device: PhysicalDevice
) -> Adapter<Backend>
pub unsafe fn adapter_from_raw(
&self,
raw_physical_device: PhysicalDevice
) -> Adapter<Backend>
Safety
raw_physical_device
must be created from self
(or from the inner raw handle)
Trait Implementations
Create a new instance. Read more
Return all available graphics adapters.
unsafe fn create_surface(
&self,
has_handle: &impl HasRawWindowHandle
) -> Result<Surface, InitError>
unsafe fn create_surface(
&self,
has_handle: &impl HasRawWindowHandle
) -> Result<Surface, InitError>
Destroy a surface, freeing the resources associated with it and releasing it from this graphics API. Read more
unsafe fn create_display_plane_surface(
&self,
display_plane: &DisplayPlane<'_, Backend>,
plane_stack_index: u32,
transformation: SurfaceTransform,
alpha: DisplayPlaneAlpha,
image_extent: Extent2D
) -> Result<Surface, DisplayPlaneSurfaceError>
unsafe fn create_display_plane_surface(
&self,
display_plane: &DisplayPlane<'_, Backend>,
plane_stack_index: u32,
transformation: SurfaceTransform,
alpha: DisplayPlaneAlpha,
image_extent: Extent2D
) -> Result<Surface, DisplayPlaneSurfaceError>
Create a new surface from a display plane. Read more
Auto Trait Implementations
impl RefUnwindSafe for Instance
impl UnwindSafe for Instance