pub struct Mesh3dRenderBudget { /* private fields */ }Expand description
Limits submitted surfaces and additional clip-space topology in one 3D draw.
Retained, wholly inside objects need no generated vertices. A crossing object’s surfaces are transformed and clipped together so one draw preserves their shared depth interpolation. Limits apply before GPU writes or clearing the target, and may be zero to disallow generated topology. The total surface limit includes both retained indices and newly generated triangles.
Implementations§
Source§impl Mesh3dRenderBudget
impl Mesh3dRenderBudget
Sourcepub const fn new(vertices: usize, triangles: usize, upload_bytes: usize) -> Self
pub const fn new(vertices: usize, triangles: usize, upload_bytes: usize) -> Self
Sets exact generated surface vertex, triangle, and total upload-byte
ceilings. Upload bytes include optional vertex colors, lighting/depth attributes and canonical
display-edge endpoints. The
total submitted surface count is unlimited unless explicitly bounded by
Self::with_max_surface_triangles.
Sourcepub const fn with_max_sorting_bytes(self, bytes: usize) -> Self
pub const fn with_max_sorting_bytes(self, bytes: usize) -> Self
Limits transient order-record capacity in frames containing Blend objects. Zero rejects such frames; opaque/masked-only frames allocate no order array. Actual allocated Vec capacity is checked before GPU writes or clearing.
Sourcepub const fn max_sorting_bytes(self) -> usize
pub const fn max_sorting_bytes(self) -> usize
Maximum transient sorting-array capacity, independent of generated geometry.
Sourcepub const fn with_surface_policy(self, policy: SurfaceRasterization3d) -> Self
pub const fn with_surface_policy(self, policy: SurfaceRasterization3d) -> Self
Chooses surface raster portability for this draw. The default preserves strict cross-backend topology proofs. Display-edge validation remains independent of the selected surface policy.
Sourcepub const fn surface_policy(self) -> SurfaceRasterization3d
pub const fn surface_policy(self) -> SurfaceRasterization3d
Returns the explicitly selected surface rasterization policy.
Sourcepub const fn with_max_surface_triangles(self, triangles: usize) -> Self
pub const fn with_max_surface_triangles(self, triangles: usize) -> Self
Limits the combined retained and generated surface triangles submitted
to the GPU. Zero permits edge-only or empty submissions. Retained indices
still submitted for hardware clipping count even when outside the view.
Failure occurs before generated staging allocations, uploads or target
mutation and returns Mesh3dRenderError::SurfaceTriangleBudgetExceeded.
Sourcepub const fn max_surface_triangles(self) -> usize
pub const fn max_surface_triangles(self) -> usize
Returns the maximum combined retained and generated surface submissions.
Sourcepub const fn max_generated_vertices(self) -> usize
pub const fn max_generated_vertices(self) -> usize
Returns the maximum generated clip-space vertices in one frame.
Sourcepub const fn max_generated_triangles(self) -> usize
pub const fn max_generated_triangles(self) -> usize
Returns the maximum generated triangle-list primitives in one frame.
Sourcepub const fn max_generated_upload_bytes(self) -> usize
pub const fn max_generated_upload_bytes(self) -> usize
Returns maximum bytes uploaded for generated surfaces and their edges.
Trait Implementations§
Source§impl Clone for Mesh3dRenderBudget
impl Clone for Mesh3dRenderBudget
Source§fn clone(&self) -> Mesh3dRenderBudget
fn clone(&self) -> Mesh3dRenderBudget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Mesh3dRenderBudget
Source§impl Debug for Mesh3dRenderBudget
impl Debug for Mesh3dRenderBudget
Source§impl Default for Mesh3dRenderBudget
impl Default for Mesh3dRenderBudget
impl Eq for Mesh3dRenderBudget
Source§impl PartialEq for Mesh3dRenderBudget
impl PartialEq for Mesh3dRenderBudget
impl StructuralPartialEq for Mesh3dRenderBudget
Auto Trait Implementations§
impl Freeze for Mesh3dRenderBudget
impl RefUnwindSafe for Mesh3dRenderBudget
impl Send for Mesh3dRenderBudget
impl Sync for Mesh3dRenderBudget
impl Unpin for Mesh3dRenderBudget
impl UnsafeUnpin for Mesh3dRenderBudget
impl UnwindSafe for Mesh3dRenderBudget
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.