Struct cafe::render::render2D::SpriteBatch
source · pub struct SpriteBatch { /* private fields */ }Implementations§
source§impl SpriteBatch
impl SpriteBatch
pub fn new(count: usize) -> Result<Self, String>
pub fn push(&mut self, data: Vertex2D)
pub fn push_vec(&mut self, data: Vec<Vertex2D>)
pub fn add_rect(&mut self, rect: &Rect)
pub fn add_quad(&mut self, v0: Vec4, v1: Vec4, v2: Vec4, v3: Vec4)
pub fn flush(&self)
pub fn count(&self) -> usize
pub fn clear(&mut self)
Trait Implementations§
source§impl Debug for SpriteBatch
impl Debug for SpriteBatch
source§impl Default for SpriteBatch
impl Default for SpriteBatch
source§fn default() -> SpriteBatch
fn default() -> SpriteBatch
Returns the “default value” for a type. Read more
source§impl PartialEq<SpriteBatch> for SpriteBatch
impl PartialEq<SpriteBatch> for SpriteBatch
source§fn eq(&self, other: &SpriteBatch) -> bool
fn eq(&self, other: &SpriteBatch) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for SpriteBatch
Auto Trait Implementations§
impl RefUnwindSafe for SpriteBatch
impl Send for SpriteBatch
impl Sync for SpriteBatch
impl Unpin for SpriteBatch
impl UnwindSafe for SpriteBatch
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more