PDA

View Full Version : Rectangle



Shomer
09-04-2009, 04:56 PM
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 !

todayman
09-04-2009, 06:19 PM
It doesn't seem like you have much experience with OpenGL, so take a look at the Getting Started (http://www.opengl.org/wiki/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.