Skip to main content

draw_presented

Function draw_presented 

Source
pub fn draw_presented(render: Entity) -> OnFrame
Expand description

The draw behaviour: drain the render sub-world’s command queue, then dispatch the frame into it and present the result.

render names the render sub-world the presenter presents from. Draining is what makes the sub-world a server: clients’ requests land as jobs here, on the main thread, between one frame’s render and the next.

The renderer walks every pass of the sub-world here, so the scene’s own pass – and the offscreen path’s copying pass, when there is one – both record on this one call.

The behaviour holds while the winit host reports the app suspended; a host with no winit loop counts as resumed. When the host carries more than one presenter, the first one the query yields presents.