General Questions about Translations

I’m new to OpenGL, and the concept of 3D. Though I’ve worked with it breifly in math in school. I’m just wondering how I could make an object come close to the screen and then move away.

Would you first use, gluPerspective() to set a depth and ration, and then just move along the z axis? I tried this, but the object didnt appear at all, only after a short while, and once it did, it was only there for a second. I was just wondering if anyone could give me an example of code to move any object towards the screen. Even as simple as a triangle, I should be able to build from that.

Thanks in advance, and sorry if this seems like a stupid question.

probably just axis wrong or the object moved to far or clipping planes or whatnot :wink:

plenty tutorials that start from beginning here: