pub struct GpuGeometry { /* private fields */ }Expand description
Explicitly uploaded, device-resident visual geometry.
Dropping this value releases its buffers. Call Self::recycle to return
them to the originating renderer’s bounded reuse pool.
Implementations§
Source§impl GpuGeometry
impl GpuGeometry
Sourcepub const fn kind(&self) -> GpuGeometryKind
pub const fn kind(&self) -> GpuGeometryKind
Geometry topology.
Sourcepub const fn vertex_count(&self) -> u32
pub const fn vertex_count(&self) -> u32
Number of uploaded vertices.
Sourcepub const fn index_count(&self) -> u32
pub const fn index_count(&self) -> u32
Number of uploaded indices.
Sourcepub const fn residency(&self) -> &VisualResidency
pub const fn residency(&self) -> &VisualResidency
Residency identifying the exact renderer runtime.
Sourcepub fn position_bytes(&self) -> u64
pub fn position_bytes(&self) -> u64
Logical position-buffer bytes uploaded for this geometry.
Sourcepub fn scalar_bytes(&self) -> u64
pub fn scalar_bytes(&self) -> u64
Logical scalar-buffer bytes uploaded for this geometry.
Sourcepub fn index_bytes(&self) -> u64
pub fn index_bytes(&self) -> u64
Logical index-buffer bytes uploaded for this geometry.
Sourcepub fn recycle(self, renderer: &WgpuRenderer) -> RenderResult<()>
pub fn recycle(self, renderer: &WgpuRenderer) -> RenderResult<()>
Returns all buffers to the originating renderer’s bounded reuse pool.
Auto Trait Implementations§
impl Freeze for GpuGeometry
impl !RefUnwindSafe for GpuGeometry
impl Send for GpuGeometry
impl Sync for GpuGeometry
impl Unpin for GpuGeometry
impl UnsafeUnpin for GpuGeometry
impl !UnwindSafe for GpuGeometry
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