pub struct DynamicMesh3dBudget { /* private fields */ }Expand description
Limits one scene-owned mesh update, including reserved buffers and overlap.
GPU reserve grows exactly to the larger of the current capacity, incoming live length and requested minimum. No geometric over-allocation is hidden. UV/color/normal capacities follow vertex capacity while their attributes are present.
Implementations§
Source§impl DynamicMesh3dBudget
impl DynamicMesh3dBudget
Sourcepub const fn new(upload: Mesh3dUploadBudget) -> Self
pub const fn new(upload: Mesh3dUploadBudget) -> Self
Sets final source, GPU reserve and reusable scratch limits. Default peak limits are twice each corresponding final limit (saturating at usize::MAX), including old/new overlap.
Sourcepub const fn with_minimum_capacity(
self,
vertices: usize,
indices: usize,
edges: usize,
) -> Self
pub const fn with_minimum_capacity( self, vertices: usize, indices: usize, edges: usize, ) -> Self
Requests minimum vertex, index and display-edge capacities, not live counts. Device limits and checked byte arithmetic are validated on update.
Sourcepub const fn with_peak_limits(
self,
recovery: usize,
gpu: usize,
staging: usize,
) -> Self
pub const fn with_peak_limits( self, recovery: usize, gpu: usize, staging: usize, ) -> Self
Sets exact peak source, GPU and conversion-scratch byte limits. Source/GPU peaks cover the outgoing and incoming revision once, not unrelated host snapshots or opaque in-flight driver memory. Zero prohibits that peak.
Sourcepub const fn upload_budget(self) -> Mesh3dUploadBudget
pub const fn upload_budget(self) -> Mesh3dUploadBudget
Final source, allocated GPU capacity and retained conversion-scratch ceilings.
Sourcepub const fn max_peak_recovery_bytes(self) -> usize
pub const fn max_peak_recovery_bytes(self) -> usize
Maximum operation-local old-plus-new source capacity.
Sourcepub const fn max_peak_gpu_bytes(self) -> usize
pub const fn max_peak_gpu_bytes(self) -> usize
Maximum operation-local old-plus-new GPU buffer capacity.
Sourcepub const fn max_peak_staging_bytes(self) -> usize
pub const fn max_peak_staging_bytes(self) -> usize
Maximum old scratch plus temporarily reserved replacement scratch capacity.
Trait Implementations§
Source§impl Clone for DynamicMesh3dBudget
impl Clone for DynamicMesh3dBudget
impl Copy for DynamicMesh3dBudget
Source§impl Debug for DynamicMesh3dBudget
impl Debug for DynamicMesh3dBudget
Source§impl Default for DynamicMesh3dBudget
impl Default for DynamicMesh3dBudget
impl Eq for DynamicMesh3dBudget
Source§impl PartialEq for DynamicMesh3dBudget
impl PartialEq for DynamicMesh3dBudget
impl StructuralPartialEq for DynamicMesh3dBudget
Auto Trait Implementations§
impl Freeze for DynamicMesh3dBudget
impl RefUnwindSafe for DynamicMesh3dBudget
impl Send for DynamicMesh3dBudget
impl Sync for DynamicMesh3dBudget
impl Unpin for DynamicMesh3dBudget
impl UnsafeUnpin for DynamicMesh3dBudget
impl UnwindSafe for DynamicMesh3dBudget
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.