I am trying to draw a solid cube in C++ using OpenGl feature but I want to draw it at a desired position such as glVertex3f(20,5,-35). How can I draw a solid cube at the given position?
I am trying to draw a solid cube in C++ using OpenGl feature but
Share
glTranslatef(x, y, z). Google it, I think there are 2D versions as well. But this translates the reference frame off the stack. If more complex transformation need to be set up you will need to call glpopmatrix and glpushmatrix. Careful of spelling and usage on those.