Timeline for Synchronise graphics and logic code
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2011 at 14:45 | history | edited | Vasiliy Sharapov | CC BY-SA 3.0 |
added 1557 characters in body
|
| Jun 17, 2011 at 11:21 | comment | added | user4513 | I agree on all your points, but your reason for down voting the post remains invalid, he was talking about threads; and it is a possible solution, just certainly not the best. | |
| Jun 17, 2011 at 10:58 | comment | added | Maik Semder | Ignore the last part of my first post talking about renderer's double-buffer, that was nonsense, the main point stands anyway ;) | |
| Jun 17, 2011 at 10:43 | comment | added | Maik Semder | @Daniel the problem described in the question, however, is different, the rendering thread runs faster as the game-thread, so it would either outpace the double-buffer after some frames leaving you with the original sync problem, or it has to render the same buffer more than once, which invalidates the whole point of having the rendering thread running faster. Long story short, the double buffer does not solve the problem in OP's described scenario. | |
| Jun 17, 2011 at 10:41 | comment | added | Maik Semder | @Daniel A double buffer does not solve the problem in this particular case, it only solves the problem if render-thread and game-thread run in sync already (with the same fps), so the render-thread renders last frame's game (front-)buffer, game thread manipulating current game (back-)buffer, but even then the renderers already have such a double buffer so there is no point in introducing a new one here. | |
| Jun 17, 2011 at 1:46 | comment | added | user4513 | +1 because the answer is clearly pointing out using double buffering between threads. | |
| Jun 16, 2011 at 19:36 | comment | added | Maik Semder | -1 doesnt answer the sync question at all, not even mentioned threads | |
| Jun 16, 2011 at 17:23 | history | answered | Vasiliy Sharapov | CC BY-SA 3.0 |