pub fn begin_frame(&mut self) -> Option<Frame> {
        let win = self.win.as_ref().unwrap();

        if self.resized {
            self.gui.set_drawable_size(win);
            self.sfs.recreate(win, &self.surface, &self.dev, &self.pass);
        }

        match self
            .sfs
            .next_frame(win, &self.surface, &self.dev, &self.pass)
        {
            Some(frame) => {
                let (width, height) = self.win.as_mut().unwrap().window.drawable_size();
                frame.begin(&self.pass, width, height);
                Some(frame)
            }
            None => None,
        }
    }
/// Returns a frame if available. When not available None is returned and drawing should be skipped
/// TODO: Another option would be to wait until the frame is available and then return it.
Returns a frame if available. When not available None is returned and drawing should be skipped
TODO: Another option would be to wait until the frame is available and then return it.
Returns a frame if available . When not available None is returned and drawing should be skipped TODO : Another option would be to wait until the frame is available and then return it .
pub fn begin_frame(&mut self) -> Option<Frame> {
        let win = self.win.as_ref().unwrap();
        if self.resized {
            self.gui.set_drawable_size(win);
            self.sfs.recreate(win, &self.surface, &self.dev, &self.pass);
        }
        match self
            .sfs
            .next_frame(win, &self.surface, &self.dev, &self.pass)
        {
            Some(frame) => {
                let (width, height) = self.win.as_mut().unwrap().window.drawable_size();
                frame.begin(&self.pass, width, height);
                Some(frame)
            }
            None => None,
        }
    }
pub fn begin_frame ( & mut self ) -> Option < Frame > { let win = self . win . as_ref ( ) . unwrap ( ) ; if self . resized { self . gui . set_drawable_size ( win ) ; self . sfs . recreate ( win , & self . surface , & self . dev , & self . pass ) ; } match self . sfs . next_frame ( win , & self . surface , & self . dev , & self . pass ) { Some ( frame ) => { let ( width , height ) = self . win . as_mut ( ) . unwrap ( ) . window . drawable_size ( ) ; frame . begin ( & self . pass , width , height ) ; Some ( frame ) } None => None , } }
Returns a frame if available.
Returns a frame if available .
&mut self
&mut self