render_backend
Submodules
Structs
CapturedFrame
CPU-readable screenshot payload captured from a rendered frame.
Properties
width
Type: u32
height
Type: u32
rgba
Type: Vec<u8>
GpuContext
Shared GPU device context used by sibling render surfaces.
Image
Decoded RGBA image data ready for upload as a GPU texture.
Properties
rgba
Type: Vec<u8>
pixel_width
Type: u32
pixel_height
Type: u32
RenderBackend
Low-level wgpu backend that owns surface, pipeline, and GPU buffers.
Implementations
get_clip_depth
pub fn get_clip_depth(&mut self) -> u32
Current stencil clip depth.
max_surface_dimension
pub fn max_surface_dimension(&self) -> u32
Maximum texture dimension supported by the active adapter.
resize
pub fn resize(&mut self, width: u32, height: u32)
Resize both the physical surface and logical viewport.
resize_surface
pub fn resize_surface(&mut self, width: u32, height: u32)
Resize the backing surface, clamping to device limits.
set_viewport
pub fn set_viewport(&mut self, width: f32, height: f32, dpr: [f32; 2])
Update logical viewport uniforms without reallocating the surface.
RenderConfig
GPU resource sizing and initial surface configuration.
Properties
debug
Type: bool
initial_width
Type: u32
initial_height
Type: u32
initial_dpr
Type: [f32; 2]
Implementations
new
pub fn new(_debug: bool, width: u32, height: u32, dpr: [f32; 2]) -> Self
Construct default buffer capacities for an initial surface size.
with_browser_premultiplied_alpha
pub fn with_browser_premultiplied_alpha(self, enabled: bool) -> Self
Request premultiplied browser canvas alpha for WebGPU surfaces.
wgpu's web backend currently reports only Opaque alpha in surface capabilities, but its
configure path accepts PreMultiplied and maps it to GPUCanvasAlphaMode::Premultiplied.
Pax needs that for transparent browser-owned scroller islands.