moving elements

could somebody tell me how to simply move an element (square, etc.) up, down, left, right?
is there anything simple like rotatef() ? :frowning: :rolleyes:

yes it is there.

it is glrotatef(angle,x-axis,y-axis,z-axis);

angle is the angle of rotation.

x-axis=1.0 rotate along x-axis,0.0 donot rotate along x-axis.

similarly y and z.

it is as simple as that.

I think, what you wanted to know was

glTranslatef (x, y, z);

Jan.

Thanks a lot, but I guess I explained it wrong.
Drawing is not the problem. I am trying to make some animation with a temporization. Example: I drew a robot. Now I want to make it walking. I can raise a leg, swing an arm, but how do I get the whole thing to move left, when moving the legs?

finally your question is “how to implement the perpetual movment of walking”

try:
glTranslatef(x+leg,y,z);
leg is also controlling the leg movement

Post the code so we can se what you are trying to do

the code is too long. why doesn’t anybody understand?
I am trying to slowly move an object from one place to another AFTER it has been drawn.

imagine a bee fying by, a car moving forward, that kind of thing.

as i get it you can do this:

glTranslatef(x,0,0);
draw_car();
x+=0.2f;

that will move the object, or try explaining it better…