Advertisement

Newbie question

Started by February 25, 2000 02:53 AM
2 comments, last by Anfoa 24 years, 6 months ago
just one newbie question: how can I move a whole polygon, not just one vertex?
You do this by specifying a transform matrix that every vertex in the polygon will be transformed with.

What API are you using? OpenGL, DirectX or something else?
Advertisement
OpenGL of course

Then you''ll want to do this:

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(x,y,z);

This way when you render the polygon all vertices will be moved by adding (x,y,z).





This topic is closed to new replies.

Advertisement