[][src]Trait candelabre_windowing::CandlRenderer

pub trait CandlRenderer<R, S: CandlUpdate<M>, M> {
    fn init() -> R;
fn finalize(&mut self);
fn set_scale_factor(&mut self, scale_factor: f64);
fn set_size(&mut self, nsize: (u32, u32));
fn draw_frame(&mut self, state: &S); }

Renderer Trait

This trait must be used by any structure which want to fill the gap between a CandlWindow and OpenGL.

Required methods

fn init() -> R

init the renderer

fn finalize(&mut self)

call from CandlSurface after the gl initialization

fn set_scale_factor(&mut self, scale_factor: f64)

set the scale factor when it changed

fn set_size(&mut self, nsize: (u32, u32))

set the size of the window / surface holding the OpenGL context

fn draw_frame(&mut self, state: &S)

call for redraw the current OpenGL context

Loading content...

Implementors

Loading content...