wgpu::custom

Trait InstanceInterface

Source
pub trait InstanceInterface: CommonTraits {
    // Required methods
    fn new(desc: &InstanceDescriptor) -> Self
       where Self: Sized;
    unsafe fn create_surface(
        &self,
        target: SurfaceTargetUnsafe,
    ) -> Result<DispatchSurface, CreateSurfaceError>;
    fn request_adapter(
        &self,
        options: &RequestAdapterOptions<'_, '_>,
    ) -> Pin<Box<dyn RequestAdapterFuture>>;
    fn poll_all_devices(&self, force_wait: bool) -> bool;
    fn wgsl_language_features(&self) -> WgslLanguageFeatures;
}
Available on custom only.

Required Methods§

Source

fn new(desc: &InstanceDescriptor) -> Self
where Self: Sized,

Source

unsafe fn create_surface( &self, target: SurfaceTargetUnsafe, ) -> Result<DispatchSurface, CreateSurfaceError>

Source

fn request_adapter( &self, options: &RequestAdapterOptions<'_, '_>, ) -> Pin<Box<dyn RequestAdapterFuture>>

Source

fn poll_all_devices(&self, force_wait: bool) -> bool

Source

fn wgsl_language_features(&self) -> WgslLanguageFeatures

Available on crate feature wgsl only.

Implementors§

Source§

impl InstanceInterface for ContextWgpuCore

Available on wgpu_core only.