4 ms·
No need to mess with threads in retained mode libraries, just have a call or two to run a single iteration of the event loop, e.g. Freeglut has glutMainLoopEven
by badsectoracula 3y ago
No need to mess with threads in retained mode libraries, just have a call or two to run a single iteration of the event loop, e.g. Freeglut has glutMainLoopEvent() which only handles a single event. A toolkit of mine has ff_pump_events(), ff_has_events(), etc. Normally applications are expected to do a call like "return ff_run()" at the end of main() but they could do their own main loop if they want using these functions.