pub struct VItemsBuffer { /* private fields */ }Expand description
Merged GPU buffers for all VItems in a frame.
Instead of one set of buffers per VItem, all data is packed into
contiguous arrays with an index table (item_infos) that tells
shaders where each item’s data lives.
Implementations§
Source§impl VItemsBuffer
impl VItemsBuffer
pub fn new(ctx: &WgpuContext) -> Self
Sourcepub fn update(&mut self, ctx: &WgpuContext, vitems: &[VItem])
pub fn update(&mut self, ctx: &WgpuContext, vitems: &[VItem])
Pack all VItems into the merged buffers. Called once per frame.
pub fn item_count(&self) -> u32
pub fn total_points(&self) -> u32
pub fn compute_bind_group_layout(ctx: &WgpuContext) -> BindGroupLayout
pub fn render_bind_group_layout(ctx: &WgpuContext) -> BindGroupLayout
Auto Trait Implementations§
impl Freeze for VItemsBuffer
impl !RefUnwindSafe for VItemsBuffer
impl Send for VItemsBuffer
impl Sync for VItemsBuffer
impl Unpin for VItemsBuffer
impl UnsafeUnpin for VItemsBuffer
impl !UnwindSafe for VItemsBuffer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more