fn render<ActionIter: IntoIterator<Item=RenderAction>>(&mut self, actions: ActionIter) {
        unsafe {
            panic_on_gl_error("Preparing to render to offscreen buffer");

            // Remember the active render target
            let mut previous_frame_buffer = 0;
            gl::GetIntegerv(gl::DRAW_FRAMEBUFFER_BINDING, &mut previous_frame_buffer);

            // Render to the main render target
            gl::BindFramebuffer(gl::FRAMEBUFFER, *self.main_render_target);
            self.renderer.prepare_to_render_to_active_framebuffer(self.width, self.height);

            // Perform the rendering actions
            self.renderer.render(actions);
            gl::Flush();

            // Reset to the original render target
            gl::BindFramebuffer(gl::FRAMEBUFFER, previous_frame_buffer as gl::types::GLuint);

            panic_on_gl_error("After rendering to offscreen buffer");
        }
    }
///
/// Sends render actions to this offscreen render target
///
Sends render actions to this offscreen render target
Sends render actions to this offscreen render target
fn render<ActionIter: IntoIterator<Item=RenderAction>>(&mut self, actions: ActionIter) {
        unsafe {
            panic_on_gl_error("Preparing to render to offscreen buffer");
            // Remember the active render target
            let mut previous_frame_buffer = 0;
            gl::GetIntegerv(gl::DRAW_FRAMEBUFFER_BINDING, &mut previous_frame_buffer);
            // Render to the main render target
            gl::BindFramebuffer(gl::FRAMEBUFFER, *self.main_render_target);
            self.renderer.prepare_to_render_to_active_framebuffer(self.width, self.height);
            // Perform the rendering actions
            self.renderer.render(actions);
            gl::Flush();
            // Reset to the original render target
            gl::BindFramebuffer(gl::FRAMEBUFFER, previous_frame_buffer as gl::types::GLuint);
            panic_on_gl_error("After rendering to offscreen buffer");
        }
    }
fn render < ActionIter : IntoIterator < Item = RenderAction > > ( & mut self , actions : ActionIter ) { unsafe { panic_on_gl_error ( " " ) ; // Remember the active render target let mut previous_frame_buffer = 0 ; gl :: GetIntegerv ( gl :: DRAW_FRAMEBUFFER_BINDING , & mut previous_frame_buffer ) ; // Render to the main render target gl :: BindFramebuffer ( gl :: FRAMEBUFFER , * self . main_render_target ) ; self . renderer . prepare_to_render_to_active_framebuffer ( self . width , self . height ) ; // Perform the rendering actions self . renderer . render ( actions ) ; gl :: Flush ( ) ; // Reset to the original render target gl :: BindFramebuffer ( gl :: FRAMEBUFFER , previous_frame_buffer as gl :: types :: GLuint ) ; panic_on_gl_error ( " " ) ; } }
Sends render actions to this offscreen render target
Sends render actions to this offscreen render target
&mut self
actions
ActionIter