pub struct WgpuPrep {
pub atlas: TextureAtlas,
pub clip: ClipStack,
pub quality: RenderQuality,
}Expand description
The CPU-side preparation state for the wgpu render pipeline.
WgpuPrep owns a TextureAtlas, a ClipStack, and a
RenderQuality configuration. Call prepare once per frame to batch
a oxiui_core::paint::DrawList into a PreparedFrame that a GPU consumer can execute.
Fields§
§atlas: TextureAtlasThe texture atlas for this render target.
clip: ClipStackThe active clip-rect stack.
quality: RenderQualityCurrent render-quality configuration.
Implementations§
Source§impl WgpuPrep
impl WgpuPrep
Sourcepub fn new(atlas_size: u32, quality: RenderQuality) -> Self
pub fn new(atlas_size: u32, quality: RenderQuality) -> Self
Construct a new WgpuPrep with the given atlas size and quality preset.
Sourcepub fn prepare(&mut self, list: &DrawList) -> PreparedFrame
pub fn prepare(&mut self, list: &DrawList) -> PreparedFrame
Batch list into a PreparedFrame using the current clip state.
The active clip rect (top of clip) is forwarded to the batcher as
the visibility-culling region.
Auto Trait Implementations§
impl Freeze for WgpuPrep
impl RefUnwindSafe for WgpuPrep
impl Send for WgpuPrep
impl Sync for WgpuPrep
impl Unpin for WgpuPrep
impl UnsafeUnpin for WgpuPrep
impl UnwindSafe for WgpuPrep
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