[][src]Struct ggraphics::QuadDrawCall

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

A list of quads that will be drawn in one draw call. Each uses the same texture, same mesh (built in to the quad shader), and may have different QuadData inputs.

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 QuadDrawCall[src]

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

New empty QuadDrawCall 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 QuadDrawCall[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 QuadDrawCall[src]

impl Debug for QuadDrawCall[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]