simple animation w/glut

I’m trying to “roll” a ball across a flat surface (something like miniature golf). I’m running into a few issues trying to animate the scene.

I’ve been following the example of a rotating cube from ch.1 of the red book. What I’ve ended up with a lot of flicker.

The red book doesn’t say much else on animation, so I’m somewhat at a loss.

Thanx to anyone who can help.

double buffered? code please…

When you initialize glut… use this…

glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );

and in your display code at the end… your mostly using this line…
glFlush();

well replace that with this…
glutSwapBuffers();

and in your display code at the end… your mostly using this line…
glFlush();B]

sorry to go into annoying teacher mode. “your” should be “you’re”, short for, “you are”. One of the few things that irritates me…

Well where is your capital ‘S’ Rob? Must we get into picky little things like that? I thought this was an OpenGL board?

Sorry with a capital S. Good use of grammar and spelling is fairly important from a software engineering side of things. It does make reading code somewhat easier.
However, the use of “your” as apposed to “you’re” is fairly niggly.

The worst is the use of color instead of the correct spelling colour. The cause of many wasted minutes removing or adding u’s in source code.

[This message has been edited by Rob The Bloke (edited 12-08-2001).]