[][src]Trait ggraphics::Pipeline

pub trait Pipeline {
    unsafe fn draw(&mut self, gl: &Context);
fn new_drawcall(
        &mut self,
        ctx: &mut GlContext,
        texture: Texture,
        sampler: SamplerSpec
    ) -> &mut dyn DrawCall;
fn get(&self, idx: usize) -> &dyn DrawCall;
fn get_mut(&mut self, idx: usize) -> &mut dyn DrawCall;
fn clear(&mut self);
fn drawcalls<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = &'a dyn DrawCall> + 'a>;
fn drawcalls_mut<'a>(
        &'a mut self
    ) -> Box<dyn Iterator<Item = &'a mut dyn DrawCall> + 'a>; }

TODO: Docs hnyrn

Required methods

unsafe fn draw(&mut self, gl: &Context)

foo

fn new_drawcall(
    &mut self,
    ctx: &mut GlContext,
    texture: Texture,
    sampler: SamplerSpec
) -> &mut dyn DrawCall

foo

fn get(&self, idx: usize) -> &dyn DrawCall

this seems the way to do it...

fn get_mut(&mut self, idx: usize) -> &mut dyn DrawCall

Get mut

fn clear(&mut self)

clear all draw calls

fn drawcalls<'a>(&'a self) -> Box<dyn Iterator<Item = &'a dyn DrawCall> + 'a>

Returns iterator of drawcalls. The lifetimes are a PITA.

fn drawcalls_mut<'a>(
    &'a mut self
) -> Box<dyn Iterator<Item = &'a mut dyn DrawCall> + 'a>

Returns iterator of mutable drawcalls. The lifetimes are a PITA.

Loading content...

Implementors

impl Pipeline for MeshPipeline[src]

unsafe fn draw(&mut self, gl: &Context)[src]

foo TODO: Docs

fn new_drawcall(
    &mut self,
    ctx: &mut GlContext,
    texture: Texture,
    sampler: SamplerSpec
) -> &mut dyn DrawCall
[src]

foo

impl Pipeline for QuadPipeline[src]

unsafe fn draw(&mut self, gl: &Context)[src]

foo TODO: Docs

fn new_drawcall(
    &mut self,
    ctx: &mut GlContext,
    texture: Texture,
    sampler: SamplerSpec
) -> &mut dyn DrawCall
[src]

foo

Loading content...