Trait wgpu::core::hal_api::HalApi

source ·
pub trait HalApi: Api + 'static + WasmNotSendSync {
    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>(global: &Global<G>) -> &Hub<Self>
       where G: GlobalIdentityHandlerFactory;
    fn get_surface(surface: &Surface) -> Option<&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>(global: &Global<G>) -> &Hub<Self>

source

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl HalApi for wgpu::hal::api::Empty

source§

const VARIANT: Backend = Backend::Empty

source§

impl HalApi for wgpu::hal::api::Gles

source§

const VARIANT: Backend = Backend::Gl

source§

impl HalApi for wgpu::hal::api::Vulkan

source§

const VARIANT: Backend = Backend::Vulkan