pub struct ImageBatch2d { /* private fields */ }Expand description
Renderer-owned atlas sprite batch drawn with at most one instanced draw call.
Sprite positions are local logical pixels and can be placed in any frame viewport without rebuilding or uploading the batch. The exact CPU sprite list is retained for renderer recovery. An empty batch is valid and emits no draw call.
Implementations§
Source§impl ImageBatch2d
impl ImageBatch2d
Sourcepub fn sprite_count(&self) -> usize
pub fn sprite_count(&self) -> usize
Returns retained sprite count.
Sourcepub fn sprites(&self) -> &[ImageSprite2d]
pub fn sprites(&self) -> &[ImageSprite2d]
Returns the exact retained sprite descriptions.
Sourcepub const fn budget(&self) -> ImageBatchBudget
pub const fn budget(&self) -> ImageBatchBudget
Returns its creation/replacement budget.
Sourcepub fn recovery_memory_bytes(&self) -> usize
pub fn recovery_memory_bytes(&self) -> usize
Returns retained CPU recovery bytes.
Sourcepub fn gpu_allocation_bytes(&self) -> usize
pub fn gpu_allocation_bytes(&self) -> usize
Returns GPU instance-buffer bytes actively addressed by the batch.
Auto Trait Implementations§
impl !RefUnwindSafe for ImageBatch2d
impl !UnwindSafe for ImageBatch2d
impl Freeze for ImageBatch2d
impl Send for ImageBatch2d
impl Sync for ImageBatch2d
impl Unpin for ImageBatch2d
impl UnsafeUnpin for ImageBatch2d
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