Skip to main content

Mesh3dRenderBudget

Struct Mesh3dRenderBudget 

Source
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

Source

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.

Source

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.

Source

pub const fn max_sorting_bytes(self) -> usize

Maximum transient sorting-array capacity, independent of generated geometry.

Source

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.

Source

pub const fn surface_policy(self) -> SurfaceRasterization3d

Returns the explicitly selected surface rasterization policy.

Source

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.

Source

pub const fn max_surface_triangles(self) -> usize

Returns the maximum combined retained and generated surface submissions.

Source

pub const fn max_generated_vertices(self) -> usize

Returns the maximum generated clip-space vertices in one frame.

Source

pub const fn max_generated_triangles(self) -> usize

Returns the maximum generated triangle-list primitives in one frame.

Source

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

Source§

fn clone(&self) -> Mesh3dRenderBudget

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Mesh3dRenderBudget

Source§

impl Debug for Mesh3dRenderBudget

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Mesh3dRenderBudget

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Mesh3dRenderBudget

Source§

impl PartialEq for Mesh3dRenderBudget

Source§

fn eq(&self, other: &Mesh3dRenderBudget) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Mesh3dRenderBudget

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,