Help with Double Buffering

I don’t have too much experience with OpenGL, so feel free to laugh…

I have written a program that displays some polygons and then rotates them in place. This all works fine except that the animation is “choppy” I guess would be the best word for it. It was explained to us in class that if we use:
glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE)
instead of …|GLUT_SINGLE… the double buffering would smooth out the animation.

Problem: When I switch from single to double, the window drawn is transparent or empty and nothing happens. I am using Visual C on a PC, if that makes any difference. Appreciate the help!

I think your problem is that you are not swapping your front and back buffers. Make sure you call glutSwapBuffers() after you are all finished rendering.

Nate http://nate.scuzzy.net

This was exactly the right diagnosis. Thank you, thank you, thank you!

Where do you take your classes??? College? I am currently a 16 yr old. High School Junior (US). And also, is the class worth it?? I mean do you actually learn cool stuff at fast pace or… like this is a polygon blah blah blah…

I go to SMU in Dallas, TX. I have a double major in Cinema and Computer Science. I am nearly finished with my CS degree, and I have to say that most college bachelor’s degrees are very broad in knowledge, simply due to limitations of time and the number of other classes you have to take (unless you go to a technical university.)

This is the only graphics / OpenGL class I have taken, possibly the only one offered here. But as I said, with bachelor’s degrees being broad, it is hard to get the time to have depth in many areas. However, you get foundations that you can pursue later. This one is a good class that has a lot of theory behind it in addition to technical knowledge.

E-mail me if you’d like to hear me ramble more…