Is there a mean to do double-buffering directly with OpenGL (without GLut or other windowing system)?
I saw that there are back and front buffers and I wonder if I could use them and the glDrawBuffer function for double-buffering. I tried but it doesn’t work…
Thanks in advance.
looking thru source of GLUT, it just calls the OS specific functions to create windows and input callbacks…
so lets say your on w32, you would need to use appropriate wgl commands to swap buffers (wglSwapBuffers),
or glX commands if running under Linux.
but on window creation you need to set flags for the pixelformatdescriptor and among them is
PFD_DOUBLEBUFFER for double buffering.
GLUT is just a wrapper to make it easy to build simple apps and maintain x platform capability.
you can’t do double buffering with glDrawBuffer because you don’t have glSwapBuffersWithoutWindowingSystem
OK, thanks all. So impossible to do double-buffering directly with OGL, without using the windowing system