Skip to main content

Renderer

Trait Renderer 

Source
pub trait Renderer {
    // Required methods
    fn begin_frame(&mut self, width: u32, height: u32, clear_color: Color);
    fn draw_mesh(
        &mut self,
        mesh: &Mesh,
        transform: &Transform,
        material: &Material,
        camera: &Camera3D,
    );
    fn draw_text(
        &mut self,
        text: &str,
        world_pos: Vec3,
        font: &mut FontAtlas,
        px: f32,
        color: Color,
        camera: &Camera3D,
    );
    fn end_frame(&mut self) -> &FrameBuffer;
}

Required Methods§

Source

fn begin_frame(&mut self, width: u32, height: u32, clear_color: Color)

Source

fn draw_mesh( &mut self, mesh: &Mesh, transform: &Transform, material: &Material, camera: &Camera3D, )

Source

fn draw_text( &mut self, text: &str, world_pos: Vec3, font: &mut FontAtlas, px: f32, color: Color, camera: &Camera3D, )

Source

fn end_frame(&mut self) -> &FrameBuffer

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§