Moving Object: Example Solid Cube

Started by
1 comment, last by tnutty 14 years, 11 months ago
Hello, I am trying to move my object: as the example is solid cube. Any hint how do I do it? PS: Not moving the camera, but the object. Should I translatef every corner of my cube?
Advertisement
1) apply camera matrix.
2) push camera matrix.
3) translate cube.
4) pop camera matrix.
glPushMatrix();

glTranslatef(x,y,z);
cubeDraw();

glPopMatrix();


//really dont need the push and pop to achieve translation though.



Our whole life is a opengl application.

This topic is closed to new replies.

Advertisement