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: Rectangle

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2009
    Posts
    1

    Rectangle

    Hi everybody!
    I'm just a begginer in OpenGL. I have a task.
    Present 4 rectangles of a black color. What I need is to choose
    with a keys up/down/left/right the rectangle(the sides of the rectangle have to be highlighted) and to mark it with a white color.
    Please, give me an idea how to do it!
    Thanks a lot !

  2. #2
    Junior Member Regular Contributor
    Join Date
    Dec 2008
    Location
    USA
    Posts
    135

    Re: Rectangle

    It doesn't seem like you have much experience with OpenGL, so take a look at the Getting Started page.

    You need some library, like GLUT, SDL, FreeGLUT, GLFW to create a window and recieve events. When the arrow keys get pressed, you'll be notified and can take the appropriate action. Consult the documentation for the library you choose.

Posting Permissions

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