Using Opengl to draw 2 rectangles

I am a complete beginner and I was wondering how easy it would be to draw 2 simple rectangles in opengl and having them move up, down, left and right?

It is pretty simple to do, but it takes a decent amount of work though. Not really sure how to explain how difficult it is, though.

If you are thinking about learning it, here are some good tutorials:
http://www.opengl-tutorial.org
http://www.arcsynthesis.org/gltut/

Edit:
You will need to know some kind of advanced math to do it. Well, at least advanced to me. Matrices, Vectors, etc..
Last edited on
OpenGL provides methods for drawing rectangles:
http://www.opengl.org/sdk/docs/man2/xhtml/glRect.xml

Moving them is just a matter of taking input from the user, and adjusting the position of the rectangles.

It's a pretty simple task, though there will be a lot of boilerplate you'll need to write first.
^ Much better explanation.
Wow, thank you so much this is better than I expected! Thank both of you for your help :)
Topic archived. No new replies allowed.