pub async fn for_surface(
        surface: wgpu::Surface,
        adapter: &wgpu::Adapter,
    ) -> Result<Self, wgpu::RequestDeviceError> {
        let (device, queue) = adapter.request_device(
            &wgpu::DeviceDescriptor {
                label: Some("parrot device"),
                limits: wgpu::Limits::default(),
                features: wgpu::Features::empty(),
            },
            None
        ).await?;

        Ok(Self {
            wgpu: device,
            queue,
            surface: Some(surface),
            size: Size2D::default(),
        })
    }
/// Create a device for a given surface
Create a device for a given surface
Create a device for a given surface
pub async fn for_surface(
        surface: wgpu::Surface,
        adapter: &wgpu::Adapter,
    ) -> Result<Self, wgpu::RequestDeviceError> {
        let (device, queue) = adapter.request_device(
            &wgpu::DeviceDescriptor {
                label: Some("parrot device"),
                limits: wgpu::Limits::default(),
                features: wgpu::Features::empty(),
            },
            None
        ).await?;
        Ok(Self {
            wgpu: device,
            queue,
            surface: Some(surface),
            size: Size2D::default(),
        })
    }
pub async fn for_surface ( surface : wgpu :: Surface , adapter : & wgpu :: Adapter , ) -> Result < Self , wgpu :: RequestDeviceError > { let ( device , queue ) = adapter . request_device ( & wgpu :: DeviceDescriptor { label : Some ( " " ) , limits : wgpu :: Limits :: default ( ) , features : wgpu :: Features :: empty ( ) , } , None ) . await ? ; Ok ( Self { wgpu : device , queue , surface : Some ( surface ) , size : Size2D :: default ( ) , } ) }
Create a device for a given surface
Create a device for a given surface
surface
wgpu::Surface
adapter
&wgpu::Adapter