Trait gl_utils::render::resource::Resource [−][src]
pub trait Resource { fn new(glium_display: &Display) -> Self; fn init(_render: &mut Render<Self>)
where
Self: Sized, { ... } fn draw_2d(_render: &Render<Self>, _glium_frame: &mut Frame)
where
Self: Sized, { ... } fn draw_3d(_render: &Render<Self>, _glium_frame: &mut Frame)
where
Self: Sized, { ... } }
Represents a generic Glium resource type for a renderer to use as a source of drawing (vertex rendering).
The resource should have all the shader programs, vertex buffers, textures,
etc. necessary to make a draw
call on a given glium::Frame
.
The default frame functions will call the draw_2d
and draw_3d
methods,
which do nothing by default.
Required Methods
fn new(glium_display: &Display) -> Self
Provided Methods
fn init(_render: &mut Render<Self>) where
Self: Sized,
Self: Sized,
fn draw_2d(_render: &Render<Self>, _glium_frame: &mut Frame) where
Self: Sized,
Self: Sized,
fn draw_3d(_render: &Render<Self>, _glium_frame: &mut Frame) where
Self: Sized,
Self: Sized,
Implementors
impl Resource for DefaultResource