I'm building a cube using other smaller cubes and its being constructed like this:
a = world axis
c = cube
a c c
c c c
c c c
Now I would like to move the axis to the center like this:
c c c
c a c
c c c
Currently my code looks like this:
How can I change the world axis to the center of cube?Code:glTranslate(0,0,-20); glRotatef(rot,0,1,0); for (int i = 0; i < 3; i++) { ... 2 more for's glPushMatrix(); glTranslatef(...); drawCube(); glPopMatrix(); }