Trait riddle_renderer_common::RenderContext [−][src]
pub trait RenderContext<R: CommonRenderer> { fn set_transform(
&mut self,
transform: ColumnMatrix4<f32>
) -> Result<(), RendererError>; fn clear(&mut self, color: Color<f32>) -> Result<(), RendererError>; fn draw(
&mut self,
renderable: &Renderable<'_, R>
) -> Result<(), RendererError>; fn fill_rect(
&mut self,
rect: &Rect<f32>,
color: Color<f32>
) -> Result<(), RendererError>; fn present(self) -> Result<(), RendererError>; }
The context provided to render callbacks
Required methods
fn set_transform(
&mut self,
transform: ColumnMatrix4<f32>
) -> Result<(), RendererError>
[src]
&mut self,
transform: ColumnMatrix4<f32>
) -> Result<(), RendererError>
Replace the current world transform.
fn clear(&mut self, color: Color<f32>) -> Result<(), RendererError>
[src]
Fill the target with a flat color.
fn draw(&mut self, renderable: &Renderable<'_, R>) -> Result<(), RendererError>
[src]
Draw a Renderable
to the target with the current world transform.
fn fill_rect(
&mut self,
rect: &Rect<f32>,
color: Color<f32>
) -> Result<(), RendererError>
[src]
&mut self,
rect: &Rect<f32>,
color: Color<f32>
) -> Result<(), RendererError>
Draw a solid rect with the given color.
fn present(self) -> Result<(), RendererError>
[src]
Consume the context and present any outstanding draw calls.