Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@mh01 Thanks, do you have a link to an example? I still think there's a potential issue - if the update() call is very fast, then the previous frame will still be rendering when calling requestRender(), even in a double buffered context couldn't that still be an issue?
@RoyT. My (probably naive) thinking was that I want to ensure that the whole frame is drawn in a consistent state. My updateGameState() call is made in the main game loop thread, and I only want OpenGL to draw when all sprites have been updated to the current time. I was planning to store the positions and rotations of sprites before drawing them asynchronously with OpenGL (and then recalling updateGameState() on the CPU while the current frame is being rendered on the GPU).