[][src]Struct ggraphics::MeshDrawCall

pub struct MeshDrawCall {
    pub instances: Vec<QuadData>,
    pub dirty: bool,
    // some fields omitted
}

TODO: Make this actually a mesh

Fields

instances: Vec<QuadData>

The instances that will be drawn.

dirty: bool

Whether or not the instances have changed compared to what the VBO contains, so we can only upload to the VBO on changes

Methods

impl MeshDrawCall[src]

pub fn new(
    ctx: &mut GlContext,
    texture: Texture,
    sampler: SamplerSpec,
    pipeline: &MeshPipeline
) -> Self
[src]

New empty MeshDrawCall using the given pipeline.

pub fn add(&mut self, quad: QuadData)[src]

Add a new instance to the quad data. Instances are cached between draw() invocations.

pub fn clear(&mut self)[src]

Empty all instances out of the instance buffer.

Trait Implementations

impl DrawCall for MeshDrawCall[src]

fn add(&mut self, quad: QuadData)[src]

TODO: Refactor

fn clear(&mut self)[src]

TODO: Refactor

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

TODO: Refactor

impl Drop for MeshDrawCall[src]

impl Debug for MeshDrawCall[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]