Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Need help in Open GL Programming

  1. #1
    Newbie Newbie
    Join Date
    Oct 2013
    Posts
    1

    Need help in Open GL Programming

    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.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    Post some code with a specific problem if you want help. See our FAQ - We don't write programs for people

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •