PDA

View Full Version : simple animation w/glut



pbrisk
07-17-2000, 02:42 PM
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.

07-17-2000, 02:49 PM
double buffered? code please...

warlordQ
07-19-2000, 05:46 AM
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();

Rob The Bloke
07-20-2000, 03:35 PM
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........

matt
12-06-2001, 09:22 PM
Well where is your capital 'S' Rob? Must we get into picky little things like that? I thought this was an OpenGL board?

Rob The Bloke
12-08-2001, 03:23 AM
Sorry with a capital S. http://www.opengl.org/discussion_boards/ubb/tongue.gif 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. http://www.opengl.org/discussion_boards/ubb/smile.gif

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. http://www.opengl.org/discussion_boards/ubb/tongue.gif

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