[−][src]Trait gfx_gtk::GlRenderCallback
Implement custom render behaviour for the GlArea
CFcolor format of the offline targetDFdepth format of the offline target
Required methods
fn render(
&mut self,
gfx_context: &mut GlGfxContext,
viewport: &Viewport,
render_target: &GlFrameBuffer<CF>,
depth_buffer: &GlDepthBuffer<DF>
) -> Result<GlRenderCallbackStatus>
&mut self,
gfx_context: &mut GlGfxContext,
viewport: &Viewport,
render_target: &GlFrameBuffer<CF>,
depth_buffer: &GlDepthBuffer<DF>
) -> Result<GlRenderCallbackStatus>
Invoked when the GlArea needs rendering (after an expose or queue_draw event)
gfx_contextGfx device, factory, encoder attached to the current Gl contextviewportsize of the GlArearender_targetthe offscreen target to render todepth_bufferthe offscreen depth buffer associated to therender_target
After rendering, the result should contain either:
*Ok(Continue) to proceed with the postprocessing step
*Ok(Skip) to blit directly to the GlArea buffer
*Err(_) will stop the rendering of the requested frame
Gtk may or may not retain the previous state of the frame
Provided methods
fn resize(
&mut self,
_gfx_context: &mut GlGfxContext,
_viewport: Viewport
) -> Result<GlRenderCallbackStatus>
&mut self,
_gfx_context: &mut GlGfxContext,
_viewport: Viewport
) -> Result<GlRenderCallbackStatus>
Invoked when the GlArea has been resized
gfx_contextGfx device, factory, encoder attached to the current Gl contextviewportsize of the GlArea after resizing Should returnContinue