Trait wgpu_core::hub::HalApi

source ·
pub trait HalApi: Api {
    const VARIANT: Backend;

    // Required methods
    fn create_instance_from_hal(
        name: &str,
        hal_instance: Self::Instance
    ) -> Instance;
    fn instance_as_hal(instance: &Instance) -> Option<&Self::Instance>;
    fn hub<G: GlobalIdentityHandlerFactory>(global: &Global<G>) -> &Hub<Self, G>;
    fn get_surface(surface: &Surface) -> Option<&HalSurface<Self>>;
    fn get_surface_mut(surface: &mut Surface) -> Option<&mut HalSurface<Self>>;
}

Required Associated Constants§

Required Methods§

source

fn create_instance_from_hal( name: &str, hal_instance: Self::Instance ) -> Instance

source

fn instance_as_hal(instance: &Instance) -> Option<&Self::Instance>

source

fn hub<G: GlobalIdentityHandlerFactory>(global: &Global<G>) -> &Hub<Self, G>

source

fn get_surface(surface: &Surface) -> Option<&HalSurface<Self>>

source

fn get_surface_mut(surface: &mut Surface) -> Option<&mut HalSurface<Self>>

Implementors§

source§

impl HalApi for Empty

source§

const VARIANT: Backend = Backend::Empty

source§

impl HalApi for Gles

Available on crate feature gles only.
source§

const VARIANT: Backend = Backend::Gl

source§

impl HalApi for Vulkan

Available on crate feature vulkan and non-WebAssembly only.
source§

const VARIANT: Backend = Backend::Vulkan