InstanceExt

Trait InstanceExt 

Source
pub trait InstanceExt {
    // Required methods
    async fn create_device(
        &self,
        window: Arc<Window>,
        options: AdapterOptions,
        device_descriptor: &DeviceDescriptor<'_>,
        present_mode: PresentMode,
        pipelined_enabled: EnabledPipelines,
    ) -> Result<GpuRenderer, GraphicsError>;
    async fn get_adapters(
        &self,
        options: AdapterOptions,
    ) -> Vec<(Adapter, u32, u32)>;
}
Expand description

Trait used to Allow the wgpu::Instance to Create a GpuRenderer. And get Adapters.

Required Methods§

Source

async fn create_device( &self, window: Arc<Window>, options: AdapterOptions, device_descriptor: &DeviceDescriptor<'_>, present_mode: PresentMode, pipelined_enabled: EnabledPipelines, ) -> Result<GpuRenderer, GraphicsError>

Creates a GpuRenderer.

Source

async fn get_adapters( &self, options: AdapterOptions, ) -> Vec<(Adapter, u32, u32)>

Gets a list of Avaliable Adapters based upon the AdapterOptions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl InstanceExt for Instance

Source§

async fn get_adapters( &self, options: AdapterOptions, ) -> Vec<(Adapter, u32, u32)>

Source§

async fn create_device( &self, window: Arc<Window>, options: AdapterOptions, device_descriptor: &DeviceDescriptor<'_>, present_mode: PresentMode, pipelined_enabled: EnabledPipelines, ) -> Result<GpuRenderer, GraphicsError>

Implementors§