frame buffers and render buffers, and use fast frame buffer bit
block transfers to do copies to and from backing store. Also found
a long-standing problem where multiple windows fail to refresh
properly in OpenGL and Cairo interfaces due to a lack of calling
GrLock() and GrUnlock() around the call to fetch backing store
after an expose event. The use of the general purpose frame
buffer allows magic to avoid calling any indirect rendering methods
and should now (finally) allow magic to run in OpenGL mode over a
VNC. Use of direct rendering methods only also means that magic
does not need to be compiled with the ad hoc switch to have Cairo
handle drawing into pixmaps for the icons (this remains to be
tested).
Cairo works perfectly for the off-screen rendering and that OpenGL
works perfectly for the on-screen rendering, make a compile-time
option to use both in their respective areas of perfection.
by using a Pbuffer instead of a GLXPixmap, which is too often not
supported for direct rendering. The only way I found to make this
work was to do a (very) slow pixel-by-pixel copy from the Pbuffer
into the pixmap. However, this only needs to be done once for each
toolbar icon, and the icons are small, so it is not really a problem.