UI question, and more...

I am trying to make an opnegl/c++ app for a class. (I am using GLUT). For this assignment I have to show how a hard disk works, and a few algorightms (spinning disk, getting read by a head, etc.) What would be some ways to have the different examples (like scenes in a movie). I mean, could I (and if so how) make a “menu”, and when one of the, say four choices is selected, it “plays” that part of the animation, then goes back to the main menu. How can I set up the different “animations” and get from one to the other. I hope this question is clear enough. Thanks for any input.

I would start by makeing a Global variable, say GAME_STATE, use this to toggle between different modes, then set switch statements in your display and idle loops that check the int GAME_STATE and draw/animate for the proper mode.

use keyboard the same way,

switch (key) {
case ‘1’:
case ‘2’:

then its just a matter of scripting the animations like you want, if you do use an idle loop and intend on takeing the program to a different computer, i would add another global variable say float ANIMATION_SPEED = 0.01; and set up a few keys fo increase/decrease this, and use it ever place that you would normally put an increment.