pub fn draw<'a, P>(&mut self, pipe: &mut P, data: <P as PipelineData<'a>>::Data)
    where
        P: PolyPipeline,
    {
        use gfx::Device;
        #[cfg(feature = "opengl")]
        use glutin::GlContext;

        if let Some(size) = self.window().get_inner_size() {
            if size != self.cached_size {
                self.cached_size = size;
                #[cfg(feature = "opengl")]
                self.window.resize(size.0, size.1);
                self.resize(pipe, size);
            }
        }

        pipe.apply(&mut self.encoder, self.factory.clone(), data);
        self.encoder.flush(&mut self.device);
        self.device.cleanup();

        #[cfg(feature = "opengl")]
        self.window
            .swap_buffers()
            .expect("OpenGL context has been lost");
    }
/// Draws a scene with the given pipeline.
Draws a scene with the given pipeline.
Draws a scene with the given pipeline .
pub fn draw<'a, P>(&mut self, pipe: &mut P, data: <P as PipelineData<'a>>::Data)
    where
        P: PolyPipeline,
    {
        use gfx::Device;
        #[cfg(feature = "opengl")]
        use glutin::GlContext;
        if let Some(size) = self.window().get_inner_size() {
            if size != self.cached_size {
                self.cached_size = size;
                #[cfg(feature = "opengl")]
                self.window.resize(size.0, size.1);
                self.resize(pipe, size);
            }
        }
        pipe.apply(&mut self.encoder, self.factory.clone(), data);
        self.encoder.flush(&mut self.device);
        self.device.cleanup();
        #[cfg(feature = "opengl")]
        self.window
            .swap_buffers()
            .expect("OpenGL context has been lost");
    }
pub fn draw < ' a , P > ( & mut self , pipe : & mut P , data : < P as PipelineData < ' a > > :: Data ) where P : PolyPipeline , { use gfx :: Device ; # [ cfg ( feature " " ) ] use glutin :: GlContext ; if let Some ( size ) = self . window ( ) . get_inner_size ( ) { if size != self . cached_size { self . cached_size = size ; # [ cfg ( feature " " ) ] self . window . resize ( size . 0 , size . 1 ) ; self . resize ( pipe , size ) ; } } pipe . apply ( & mut self . encoder , self . factory . clone ( ) , data ) ; self . encoder . flush ( & mut self . device ) ; self . device . cleanup ( ) ; # [ cfg ( feature " " ) ] self . window . swap_buffers ( ) . expect ( " " ) ; }
Draws a scene with the given pipeline.
Draws a scene with the given pipeline .
&mut self
pipe
&mut P
data
<P as PipelineData<'a>>::Data
&mut self
pipe
&mut P
data
<P as PipelineData<'a>>::Data