For those familiar with 3D object manipulation, OpenGL uses a “transformation matrix stack” to allow you to apply changes only to certain parts of your OpenGL object rendering without impacting the rest of the rendering.  It operates similar to a software stack.  But it only works for translations, rotation, and scaling.  Too bad that the iPhone OpenGL ES does not support push/pop of OpenGL attributes (to control linewidths, etc.)


// execute here your glTranslate(), glRotate(), glScale()
// if you are going to change the color, then restore it manually to 1,1,1,1