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§
Sourcefn get_adapter(&self) -> &Adapter
fn get_adapter(&self) -> &Adapter
Retrieve the adapter
Sourcefn get_device(&self) -> &Device
fn get_device(&self) -> &Device
Retrieve the device associated with this surface
Sourcefn get_current_texture(&self) -> GPUStarterResult<SurfaceTexture>
fn get_current_texture(&self) -> GPUStarterResult<SurfaceTexture>
Retrieve the current texture
Sourcefn get_texture_format(&self) -> GPUStarterResult<TextureFormat>
fn get_texture_format(&self) -> GPUStarterResult<TextureFormat>
Retrieve the texture format