Closed cyberbit closed 7 years ago
Command overlap causes weird graphical glitches and eventually failure of the device. Will consider using a queue to schedule graphics commands, or implementing a singleton policy that cancels the currently running thread if another is requested.
Command overlap is pretty much solved in the next commit. Only one graphics thread runs at a time, synchronized by a global thread ID variable. When a thread is started, a random ID is stored globally. During the critical section (frame loop), the current thread ID is checked against the global ID. If they do not match, the loop is skipped, and eventually the thread is cleaned up and stopped.
This will keep the client responsive. Will need to test command overlap when running animations.