A small problem, please help me...

I am really a beginner.
I made a simple “Racing” program in opengl.
I indeed wanted to use double buffer and copy all the part for double buffer from book, but it acted as single buffer, flickered all the time. I do not know where
I was wrong. Please help me.
I indeed write “glutInitDisplayMode(…| GL_DOUBLE)” and “glutSwapBuffers()” in the display callback function.
If you could take the trouble to go to my homepage: “http://ihome.ust.hk/~cszy” to see the program, I will be very grateful.
Thank you very much!

glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);

worked for me

Thank you very much!
But it doesn’t work in my system.
Actually, I use
glGetBooleanv(GL_DOUBLEBUFFER, &bdouble)
and I Found that bdouble=0, which indicates
that maybe I cannot use double buffer at all.
But my supervisor asked me to make double
buffered program on this machine, and she is
very anxious to see.
What can I do?
Thank you again!

Thanks for all.
Now I know the error:
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
should be positioned before:
glutInitWindowPosition(0, 0);
glutInitWindowSize(640, 480);
glutCreateWindow(“Racing”);

:slight_smile: