[][src]Trait gfx_gtk::GlPostprocessCallback

pub trait GlPostprocessCallback<CF, DF> where
    CF: Formatted<View = GtkTargetColorView>,
    CF::Channel: TextureChannel + RenderChannel,
    CF::Surface: RenderSurface + TextureSurface,
    DF: Formatted,
    DF::Channel: TextureChannel + RenderChannel,
    DF::Surface: DepthSurface + TextureSurface, 
{ fn postprocess(
        &mut self,
        gfx_context: &mut GlGfxContext,
        postprocess_context: &GlPostprocessContext,
        _viewport: &Viewport,
        render_screen: &GlFrameBufferTextureSrc<CF>,
        post_target: &GlFrameBuffer<GtkTargetColorFormat>
    ) -> Result<GlRenderCallbackStatus> { ... } }

Implement custom post-processing behaviour for the GlArea

  • CF color format of the offline target
  • DF depth format of the offline target

Provided methods

fn postprocess(
    &mut self,
    gfx_context: &mut GlGfxContext,
    postprocess_context: &GlPostprocessContext,
    _viewport: &Viewport,
    render_screen: &GlFrameBufferTextureSrc<CF>,
    post_target: &GlFrameBuffer<GtkTargetColorFormat>
) -> Result<GlRenderCallbackStatus>

Invoked when the GlArea needs rendering (after an expose or queue_draw event)

  • gfx_context Gfx device, factory, encoder attached to the current Gl context
  • viewport size of the GlArea
  • render_target the offscreen target to render to
  • depth_buffer the offscreen depth buffer associated to the render_target Returns:
  • Ok(Continue) will flush the command buffer and complete the frame by blitting to the GlArea
  • Err(_) will stop the rendering of the requested frame By default, the post
Loading content...

Implementors

Loading content...