pub struct PreparedScene { /* private fields */ }Expand description
Immutable scene geometry tessellated and uploaded once for repeated drawing.
Camera movement, zoom, rotation, projection tilt, viewport resizing, and DPI
changes do not invalidate prepared geometry. Shape, style, gradient, layer,
or clip changes require preparing a replacement. A prepared scene can only be
rendered by the WgpuRenderer that created it. Use
WgpuRenderer::restore_prepared_scene to recreate its GPU buffer for a
replacement renderer after device loss. Portable shader arithmetic is proved
once per exact camera/viewport uniform and retained in a bounded cache.
Implementations§
Source§impl PreparedScene
impl PreparedScene
Sourcepub fn command_count(&self) -> usize
pub fn command_count(&self) -> usize
Returns the number of accepted source scene commands.
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Returns the number of triangle-list vertices stored in the GPU buffer.
Sourcepub fn draw_batch_count(&self) -> usize
pub fn draw_batch_count(&self) -> usize
Returns the number of clip-compatible draw batches.
Sourcepub fn recovery_memory_bytes(&self) -> usize
pub fn recovery_memory_bytes(&self) -> usize
Returns currently allocated CPU recovery bytes for vertices and draw batches.
Sourcepub fn tessellation_stats(&self) -> TessellationStats
pub fn tessellation_stats(&self) -> TessellationStats
Returns command-level tessellation results captured during preparation.