delay time in Glut commands

Hi ,
I am using glut commands for creating different objects.
and I want them to have a delays for next object to be created.
what is happening is all objects display together. , But my requirement is to have a time delay for next object.

glPushMatrix();
glScalef( 0.1,0.1,0.1 );
glutSolidSphere(5,10,10);
glPopMatrix();

glPushMatrix();
glScalef( 0.1,0.1,0.1 );
glutSolidSphere(10,10,10);
glPopMatrix();

You gonna need to manager in what time each object should appear. AFAIK there is no command to do want you want.

In your rendering loop, when the time reach a specific amount you draw the first object. On the next iteration timer counter will not reach the second mark and the second object will not appear. When your timer reach on the second mark, you draw the second object and so on.

You need to keep in mind that you cannot have blocking calls like the one you want and still have the display updated.

Can anyone post some example for understanding the timer concept… So that objects should appear in the scene with some time gap.

Search for “timer” here : http://www.opengl.org/resources/faq/technical/glut.htm