GLUT double/single buffering

GLUT double/single buffering

Post by Valter Cavecchi » Sat, 07 Jun 1997 04:00:00



I wrote a program that visualizes a complex scene using GLUT
and OpenGL. The scene is drawn better if using single buffering.
However, for performance and flickering reasons, I would like to switch to
double buffering when panning or zoomin in/out using the mouse.

I browsed the GLUT documentation but I didn't find the way to switch
between single and double buffer at run time, or when asked.

Any hints about this?
Thanks a lot for any information,
bye,
        valter

--
 ----------------------------------------------------------------------------

 C.N.R. - C.E.F.S.A.         | www   : http://anubis.science.unitn.it/
 I-38050 Povo (TN) - Italy   | "In girum imus noctu, ecce ut consumimur igni"
 ----------------------------------------------------------------------------

 
 
 

GLUT double/single buffering

Post by Mark Kilga » Tue, 17 Jun 1997 04:00:00



|>
|> I wrote a program that visualizes a complex scene using GLUT
|> and OpenGL. The scene is drawn better if using single buffering.
|> However, for performance and flickering reasons, I would like to switch to
|> double buffering when panning or zoomin in/out using the mouse.
|>
|> I browsed the GLUT documentation but I didn't find the way to switch
|> between single and double buffer at run time, or when asked.
|>
|> Any hints about this?

Yes, check out the progs/examples/sb2db.c example.  It shows how
to do exactly what you want.  The solution involves using a GLUT
subwindow.

The sb2db.c example is in the GLUT 3.4 source code distribution
(I believe it was in GLUT 3.3 as well, maybe GLUT 3.2).

I hope this helps.

- Mark

 
 
 

1. switching from double buffered to single buffered mode

Does anyone know of a gracefull way to switch back and forth between
single and double buffered mode in a OpenGl drawing widget, i.e. a
widget created by
glwidget = XtVaCreateManagedWidget ( "glwidget",
                                     glwMDrawingAreaWidgetClass,
                                     GLwNdoublebuffer, True, ...);?

Thanks, Hans

--
--------------------------------------------------------------

Scientific Volume Imaging BV,
J. Geradtsweg 181,
1222 PS Hilversum, The Netherlands.

URL: http://www.svi.nl/

tel: (0)35-6859405 or (0)653-345445
fax: (0)35-6837971

2. obsolete version

3. ---> glx double buffer/ single buffer <-------

4. Bryce panorama's help

5. Double buffer/single buffer switching

6. recommendations for good disk wiping software?

7. single/double buffer in GLX mode

8. Adjust color scale of picture .PSD

9. : how to switch between single<->double buffering in mixed model

10. GLX double/single buffer and resize

11. Blending and lighting in single/double buffer

12. changing double buffering in glut at runtime

13. double buffer -> double image