In the demo, handle events before updating the scene

This commit is contained in:
Alan Jeffrey 2019-04-08 11:24:41 -05:00
parent d090dd459b
commit 3337dd897c
1 changed files with 3 additions and 3 deletions

View File

@ -184,12 +184,12 @@ impl<W> DemoApp<W> where W: Window {
}
pub fn prepare_frame(&mut self, events: Vec<Event>) -> u32 {
// Update the scene.
self.build_scene();
// Handle events.
let ui_events = self.handle_events(events);
// Update the scene.
self.build_scene();
// Get the render message, and determine how many scenes it contains.
let render_msg = self.scene_thread_proxy.receiver.recv().unwrap();
let render_scene_count = render_msg.render_scenes.len() as u32;