Will now really wait for an event when paused.
Always update and render after checking for events
if (event) {
demo_handle_event(demo, event);
free(event);
- } else if (!demo->pause){
+ }
// Wait for work to finish before updating MVP.
xglDeviceWaitIdle(demo->device);
demo_update_data_buffer(demo);
- demo_draw(demo);
+ demo_draw(demo);
- // Wait for work to finish before updating MVP.
- xglDeviceWaitIdle(demo->device);
- }
+ // Wait for work to finish before updating MVP.
+ xglDeviceWaitIdle(demo->device);
}
}