PDA

View Full Version : Need help in Open GL Programming



joevegeta
10-14-2013, 01:12 PM
PART 1. Rotating Square (Can anyone help me with the code..)

Want to draw a rotating 2D square and Need to implement the following:

1. Five gears. When the “1” key is pressed, it takes a constant first speed. When the “2” key is pressed, it takes a constant second speed. When the “3” key is pressed, it takes a constant third speed. When the “4” key is pressed, it takes a constant fourth speed. When the “5” key is pressed, it takes a constant fifth speed.
2. Press “0” key to stop the rotation immediately.
3. Press “Backspace”, it will be in reverse first speed, which has the same speed as forward first speed but in reverse direction.
4. To go in reverse gear, you must “stop” first (“0” key), then press “Backspace”. Pressing “Backspace” without first stopping the rotation, no effect should happen.
5. When the rotation is in reverse mode, the number keys “1”, “2”, “3”, “4”, “5” will make the square in five different speeds, which are the same as the respective forward speed, but in reverse direction.

tonyo_au
10-16-2013, 09:25 PM
Post some code with a specific problem if you want help. See our FAQ - We don't write programs for people