PistonDevelopers/piston — pull request #458 by gmorenz (2014-06-28 17:59:42+00:00)
Title: Introduce `ConcurrentGame`

Should not be merged before: https://github.com/PistonDevelopers/sdl2_game_window/pull/7

Introduces a `ConcurrentGame` trait that renders and updates simultaneously using a double buffer system as discussed here: https://github.com/PistonDevelopers/piston/issues/183

A test app that works with this code is available here: https://github.com/gmorenz/almost-pong.

This code uses the current `GameIterator` in a bit of an ugly way. I didn't remove the swap buffers related code, but when run with SDL2 (and probably GLFW once it implements this) the code just calls an empty method. I couldn't figure out a reasonable way to avoid this and not duplicate all the code involved with `GameIterator`.