-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GRAPHICS: Add a new frame locking mechanism
The problem with our current LOCK_FRAME() method that locks Ogre's SceneMutex is that it blocks in the render loop, therefore producing a deadlock when locking the frame and then forcing a function into the main thread (since those functions are handled in the same thread that's then waiting on the SceneMutex). To prevent that, we now implement a simple frame lock using atomics that doesn't block the main render loop. Instead, if the render method can't aquire the frame lock, it will simply jump over the rendering and continue with processing the event queue. To prevent that, we now implement a simple frame lock using atomics that doesn't block the main render loop. Instead, if the render method can't aquire the frame lock, it will simply jump over the rendering and continue with processing the event queue.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters