Expand description
One egui pass drawn into an offscreen texture: the captures of a pass nothing presents (the desktop loop’s, the browser pump’s). Render one egui pass into an offscreen texture and read it back.
An on-demand pass (on_demand: the desktop loop’s, the browser pump’s)
never presents: a hidden Wayland surface gets no frame callbacks and
presenting to it can block, and a hidden tab gets no animation frames. A
capture asked for during such a pass is drawn here instead,
with the window’s own egui_wgpu::RenderState: the same device, the same
renderer (so its textures and the 3D viewport’s paint-callback resources
are the ones the window draws with) and the same target format.
Structs§
- Drawn
- A pass drawn offscreen and copied into a read-back buffer, on its way to the CPU.
Functions§
- apply_
texture_ frees - Free the textures the pass released, after anything that drew with them.
- apply_
texture_ sets - Upload the pass’s new and changed textures to the shared renderer. The window’s next real frame never sees this pass’s texture delta, so the pass must apply it itself (a font atlas page added here is drawn there).
- capture
- Draw
shapesatsize_px(pixels_per_point) overclearand return the picture, waiting for the GPU. Its texture delta must already be applied (apply_texture_sets). Native only: the browser reads back withDrawn::on_ready. - draw
- Draw
shapesinto an offscreen texture ofsize_pxoverclear, and copy it into a buffer the CPU can map:Drawn::wait(native) orDrawn::on_ready(any target) delivers the picture.