MCPcopy Create free account
hub / github.com/Logicalshift/flo_draw / create_render_window

Function create_render_window

draw/src/render_window.rs:14–21  ·  view source on GitHub ↗

Creates a window that can be rendered to by sending groups of render actions

(properties: TProperties)

Source from the content-addressed store, hash-verified

12/// Creates a window that can be rendered to by sending groups of render actions
13///
14pub fn create_render_window<'a, TProperties: 'a+FloWindowProperties>(properties: TProperties) -> (Publisher<Vec<RenderAction>>, impl Clone+Send+Stream<Item=DrawEvent>) {
15 // Create the publisher to send the render actions to the stream
16 let mut render_publisher = Publisher::new(1);
17 let event_subscriber = create_render_window_from_stream(render_publisher.subscribe(), properties);
18
19 // Publisher can now be used to render to the window
20 (render_publisher, event_subscriber)
21}
22
23///
24/// Creates a window that renders a stream of actions

Callers 2

mainFunction · 0.85

Calls 1

Tested by

no test coverage detected