What is the difference between double buffer and single buffer?
What is the double buffer and single buffer in glx?
Why use these two buffers?
When drawing to a screen, unless you have a very simple drawing,
you will most likely never be able to draw what you want faster
than the screen refreshes. i.e. whether it be image, object,
or single pixels, odds are good that you won't be able
to update changes to what you're drawing faster than the
scan rate of your video signal.
This means that if you want to show an animation, let's say
you just want to flip images, then if you cannot write the
next image into your frame buffer between updates, you'll
see a flicker, or pronounced gaps in the animation as
the video signal catches your program in the act of redrawing
the image into memory.
Double buffering allows you to have your screen reading a
certain area of your video memory while you write to
a different area. Once you know that you're done writing
the next image, you switch between the two areas so that
the screen refreshes starting from the area that you just
finished drawing into. It makes for much smoother animations
whether it's just image flipping or full 3D rendering.
Does this clear up the other questions too?
> What is the difference between double buffer and single buffer?
> What is the double buffer and single buffer in glx?
> Why use these two buffers?
I want to switch between single and double buffering during execution
of my application, I am using the GlxMDraw - GL drawing widgets but i'm
unable to switch between single and double buffering after the widget is
created. Does anyone know a way around this ?
SINTEF - Division thermodynamics