Pause in OpenGL, but don't stop drawing... ?
I've made a version of 2D Asteroids using OpenGL on a *nix system.
I'm wondering how, after the player has cleared the field of rocks, to pause the game prior to displaying a new cluster of rocks. Basically, here are the sequence of events I want to achieve:
- Player kills last asteroid,
- Message pops up announcing graduation to a new level of the game for about 5 seconds. In the meantime, the ship is still able to fly around in the background, but no asteroids appear.
- After the time of 5 seconds is up, the message disappears, and the field is repopulated with asteroids.
- The game continues.
I can use any of the pausing techniques discussed on the forums here, but simply pausing the operation of the program altogether obviously prevents the rendering of the ship to stop as well. I'd like the display cycle to continue.
I hope I'm clear with the description of my problem. Thanks for any help.