Trait re_viewer::external::egui_kittest::TestRenderer
pub trait TestRenderer {
// Required methods
fn handle_delta(&mut self, delta: &TexturesDelta);
fn render(
&mut self,
ctx: &Context,
output: &FullOutput,
) -> Result<ImageBuffer<Rgba<u8>, Vec<u8>>, String>;
// Provided method
fn setup_eframe(&self, _cc: &mut CreationContext<'_>, _frame: &mut Frame) { ... }
}
Required Methods§
fn handle_delta(&mut self, delta: &TexturesDelta)
fn handle_delta(&mut self, delta: &TexturesDelta)
Handle a [TexturesDelta
] by updating the renderer’s textures.
fn render(
&mut self,
ctx: &Context,
output: &FullOutput,
) -> Result<ImageBuffer<Rgba<u8>, Vec<u8>>, String>
fn render( &mut self, ctx: &Context, output: &FullOutput, ) -> Result<ImageBuffer<Rgba<u8>, Vec<u8>>, String>
Render the crate::Harness
and return the resulting image.
§Errors
Returns an error if the rendering fails.
Provided Methods§
fn setup_eframe(&self, _cc: &mut CreationContext<'_>, _frame: &mut Frame)
fn setup_eframe(&self, _cc: &mut CreationContext<'_>, _frame: &mut Frame)
We use this to pass the glow / wgpu render state to [eframe::Frame
].