OpenGL single/doublebuffered


I’m new to JUCE, just checking it out a bit, starting with the OpenGL related functionality. I don’t see any way to get/set the OpenGL buffering mode :
single buffer or double buffer…
I have searched the JUCE docs and forums, to no avail. Can anyone help?


Looks like double buffer is the default in the OpenGL pixel format class. That would be hard

Hopefully that’s what you wanted? It’s really the default on most OS’s these days, you’d have trouble getting a single buffered context.

If you follow your drawing code with a swapbuffers call and don’t enable swap with v sync that’s going to get you close.

If you want double buffered, you’re in luck!



A single buffered OpenGL context has the merit of using less memory, and it allows some nice incremental rendering tricks. With composited desktops becoming the standard, even single buffered rendering is effectively double buffered.
I can live with JUCE offering only double buffered GL (which can be made to
"emulate" a single buffered mode by rendering into the front buffer), but I’m just surprised that it has “forgotten” the single buffer mode.