[−][src]Struct ggraphics::QuadDrawCall
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]
ctx: &mut GlContext,
texture: Texture,
sampler: SamplerSpec,
pipeline: &QuadPipeline
) -> Self
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
impl !Send for QuadDrawCall
impl !Sync for QuadDrawCall
impl Unpin for QuadDrawCall
impl !UnwindSafe for QuadDrawCall
impl !RefUnwindSafe for QuadDrawCall
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,