On Tue, 22 Dec 2015 03:13:31 -0800, russell.potter3 wrote:
I suppose I really need to re-phrase my question to
ask if there's an reasonably OS-agnostic way to do double-buffering in OpenGL?
Double buffering is outside the scope of OpenGL itself. It's down to the
window system, which means that it involves platform-specific functions.
On X11, double-buffering is enabled by specifying the GLX_DOUBLEBUFFER attribute when using glXChooseVisual() to choose a visual to pass to glXCreateContext().
On Windows, it's enabled by specifying the PFD_DOUBLEBUFFER flag when
calling ChoosePixelFormat(), setting that format on the DC with SetPixelFormat(), then creating a GL context for that DC with wglCreateContext().
The procedure is similar on MacOS X, although there are different
mechanisms for Carbon (C) and Cocoa (Objective-C).
The main reason GLUT was created was to provide a simple, cross-platform interface to the window system.
You will find similar functionality in any cross-platform GUI toolkit
which includes OpenGL support (e.g. GTK, Qt, wxWidgets), as well as cross-platform graphics libraries which don't provide more complex GUI functionality (e.g. GLUT, GLFW, SDL, SFML).
All of those provide cross-platform context management functions by
writing distinct versions of the functions for Windows, X11 and MacOS X.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)