Rotating a cup

Hi!
I need to display a rotating cup on my screen. How do i go about doing it using OpenGL. Please help me with sample code if possible.
Thanx in advance.

Sailesh

Try the glRotate command.

glRotate (x, y, z);
glBegin…

your object

glEnd…

Also check out http://nehe.gamedev.net
a good place of examples of Opengl code.

maybe a little hint,

there is also a teapot in opengl (glut).
you can display this “pot” typing:

 glutSolidTeapot(1.0f)
        
 glutWireTeapot(1.0f)

the “1.0f” is some kind of scaling factor.
write the lines

float i=0.0;
glLoadIdentity();
glRotate(i+=0.1,0,1,0);

above the teapot call. and you will have a rotating teapot.

greetings

thorsten

[This message has been edited by thorsten.droell (edited 12-19-2001).]

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.