Hi,
I am creating a 2D object using different primitives, namely; 2 Polygons and a Curve. I have put the drawing commands for each primitive in its own void function. Within each function there are also translation commands (along with glLoadIdentity), so that it is in the right place on the overall object. I then call each of the functions at render() and it renders them all out in the specified locations.
However…
I need to translate the object and create other instances of it. I could to this by copying the functions and renaming them, then changing the translation functions within each object. However this seems wastefull and tedious. Is there any way I can make it so that I can use one translation function for the whole object, not each primitive.
Maybe I need to use Pop and Push Matrix but im not sure where I would call them.
Your help would be much appreciated, and needed!
Thanks,
Jay