Trait wgpu_hal::Instance

source ·
pub trait Instance<A: Api>: Sized + Send + Sync {
    // Required methods
    unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>;
    unsafe fn create_surface(
        &self,
        display_handle: RawDisplayHandle,
        window_handle: RawWindowHandle
    ) -> Result<A::Surface, InstanceError>;
    unsafe fn destroy_surface(&self, surface: A::Surface);
    unsafe fn enumerate_adapters(&self) -> Vec<ExposedAdapter<A>>;
}

Required Methods§

source

unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>

source

unsafe fn create_surface( &self, display_handle: RawDisplayHandle, window_handle: RawWindowHandle ) -> Result<A::Surface, InstanceError>

source

unsafe fn destroy_surface(&self, surface: A::Surface)

source

unsafe fn enumerate_adapters(&self) -> Vec<ExposedAdapter<A>>

Implementors§

source§

impl Instance<Api> for Context

source§

impl Instance<Api> for Instance

Available on crate feature vulkan only.