1. I was hoping to find a good example in my library that I could cut/paste for you but, unfortunately, I don't have anything.
For whatever it's worth, this is an excellent book with TONS of sample code.:
Professional Graphics Programming in the X Window System
Eric F. Johnson, Kevin Reichard
MIS Press, 1993; ISBN 1-55828-255-6
It's been out-of-print for over 10 years, but you can still get used copies from Amazon for as little as $5.00 - $10.00 (USD). If you're genuinely serious about learning Xlib, I think it would definitely be a very, very good investment.
And just FYI, all of Chap 25 is devoted to Double Buffering (including complete sample code).
2. This is another excellent Xlib programming resource, and it, too has a double-buffering example:
3. Neither Johnson nor Kenton use XDBE per se.
They use a (relatively straightforward) technique where they allocate different Xlib color planes, and then simply alternate between one and the other planes.
When I googled for XDBE code, I got the same results you did: nothing! These two links are the best I was able to find:
4. The intent of my original post, however, was actually to *dissuade* you from trying Xlib for this particular project. I get a strong sense you might be better off with a higher-level library. One that'll do double-buffering (and a lot more!) for you automatically.
You mentioned GTK+ 2.0 and Qt; I added OpenGL and SDL. Any of these four would be a good choice.
I resisted suggesting too many alternatives, but I'd really like to add XForms (http://www.york.ac.uk/services/cserv...ics/xforms.htm
) and FLTK (http://http://www.fltk.org/
) to the list.
And in particular, I think you might enjoy this article in this month;s edition of "Linux Journal" (most of this month's issue is devoted to "Ruby"; it should be available on most news stands):
"Under-Ice Sonar Visualization", Richard R. Shell, Garner C. Bishop and Douglas B. Maxwell
'Hope that helps .. and good luck!
Your .. PSM