[−][src]Struct ggraphics::MeshDrawCall
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]
ctx: &mut GlContext,
texture: Texture,
sampler: SamplerSpec,
pipeline: &MeshPipeline
) -> Self
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
impl !Send for MeshDrawCall
impl !Sync for MeshDrawCall
impl Unpin for MeshDrawCall
impl !UnwindSafe for MeshDrawCall
impl !RefUnwindSafe for MeshDrawCall
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,