MyDevice

Trait MyDevice 

Source
pub trait MyDevice: Send + Sync {
    // Required methods
    fn get_adapter(&self) -> &Adapter;
    fn get_device(&self) -> &Device;
    fn get_queue(&self) -> &Queue;
    fn get_current_texture(&self) -> GPUStarterResult<SurfaceTexture>;
    fn get_texture_format(&self) -> GPUStarterResult<TextureFormat>;
    fn resize(&mut self, sizes: (u32, u32));
}
Expand description

Trait as an abstraction of the underlying device

Required Methods§

Source

fn get_adapter(&self) -> &Adapter

Retrieve the adapter

Source

fn get_device(&self) -> &Device

Retrieve the device associated with this surface

Source

fn get_queue(&self) -> &Queue

Retrieve the underlying queue present

Source

fn get_current_texture(&self) -> GPUStarterResult<SurfaceTexture>

Retrieve the current texture

Source

fn get_texture_format(&self) -> GPUStarterResult<TextureFormat>

Retrieve the texture format

Source

fn resize(&mut self, sizes: (u32, u32))

Resize the window

Implementors§