On Nov 11, 2006, at 3:01 PM, Erik Buck wrote:
2) Use an overlay window (child window): Let the Window Server do
the work for you by using an additional window and therefore an
additional backing store. Put whatever transparent drawing you
want in a child window that is layered correctly. The Window
Server will composite from both layered windows to produce the
final result in the frame buffer. You can have a transparent
document view layered above the child window or visa versa. It's
all good to the Window Server. I use this technique to layer
Cocoa controls over pure OpenGL drawing all the time.
I did several versions of this and was able to get them to work
nicely for stuff above the main drawing in the document view -- I
am using an overlay transparent view (a subview of my custom view)
all the time. In your suggestion above, if I create a child window
and order it below the window with the document view, then how will
I make the content of this child window seen through the document
view (enclosed in a scroll view) in the main window? Even if the
scroll view doesn't draw its background, wouldn't the main window
(above the child window) be in the way? I think this would be
the most attractive option for me, if it can be made to work.