View Full Version : Double buffering
02-19-2001, 11:59 AM
How do you implement double buffering into your OpenGL apps? I havn't seen any tutorials on it yet.
choose a double buffering window instead of a single one when u create it eg for glut use GLUT_DOBLE instead of GLUT_SINGLE
02-19-2001, 06:31 PM
This depends on how you're using OpenGL. If you're using GLUT, then it's pretty simple. When you call glutInitDisplayMode(), make sure that you include GLUT_DOUBLE as one of the parameters:
(ex: glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE) ;)
Then, when you want to draw the screen, call glutSwapBuffers() instead of glFlush().
If you're using the WinAPI, then it's a little more challenging. I can't remember off the top of my head how it's done, but I'm pretty sure that NeHe's Tutorial 1 covers it.
-Good Luck! :)
[This message has been edited by DLink (edited 02-19-2001).]
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.