pub fn create(self) -> Viewport {
        let size = self.window.inner_size();
        let surface = unsafe { self.gpu.instance.create_surface(&self.window) };
        let format = if let Some(format) = self.format {
            format
        } else {
            surface.get_preferred_format(&self.gpu.adapter).unwrap()
        };

        Viewport::new(
            self.gpu,
            surface,
            size.width,
            size.height,
            format,
            self.window,
        )
    }
/// Build the Viewport.
/// Note this builder is consumed to pass the GpuHandle to the built Viewport.
Build the Viewport.
Note this builder is consumed to pass the GpuHandle to the built Viewport.
Build the Viewport . Note this builder is consumed to pass the GpuHandle to the built Viewport .
pub fn create(self) -> Viewport {
        let size = self.window.inner_size();
        let surface = unsafe { self.gpu.instance.create_surface(&self.window) };
        let format = if let Some(format) = self.format {
            format
        } else {
            surface.get_preferred_format(&self.gpu.adapter).unwrap()
        };
        Viewport::new(
            self.gpu,
            surface,
            size.width,
            size.height,
            format,
            self.window,
        )
    }
pub fn create ( self ) -> Viewport { let size = self . window . inner_size ( ) ; let surface = unsafe { self . gpu . instance . create_surface ( & self . window ) } ; let format = if let Some ( format ) = self . format { format } else { surface . get_preferred_format ( & self . gpu . adapter ) . unwrap ( ) } ; Viewport :: new ( self . gpu , surface , size . width , size . height , format , self . window , ) }
Build the Viewport.
Build the Viewport .
self
self