I am new to OpenGL and C and I need to create a 2d game that has about 24 moving squares with two different colors. It took me forever to create just one moving square but I am having a difficult time creating more than one! Does anyone have any hints or idea, or maybe can give me sum kinda structure to work off of? If i can create at least two...I can build off of that.

So this loop is:
Setting the colour of each vertex
preserving the current camera (aka the GL_MODELVIEWMATRIX)
positioning each square object into view by the camera (building an internal world-to-camera matrix)
sending the geometry to the GL
restoring the current camera.

That should do it.

ShaolinMist

10-31-2011, 06:42 AM

Sorry if I offended you about the name, I guess I was seeing red and not the title. But thank you for your help! I really appreciate it! :)

BionicBytes

10-31-2011, 06:45 AM

I couldn't give a #@£! about these kinds of things personally. But, you do have to remember this is a public forum and you should always try to respect others who may take offence.
Lesson learnt? OK, preaching over now.