OpenGL in child windows

Chris Robinson chris.kcat at
Wed Jan 10 17:03:30 CST 2007

On Wednesday 10 January 2007 12:22, Frank Richter wrote:
> Hmm, if OGL is displayed in its own child window, maybe it's possible to
> shape it so that overlapping Win32 child windows are "excluded"...

I'm not sure how to do that, given that the overlaps can cause the child 
window to have concave shapes that change when the user moves child windows 

One idea I had though, was to create another child window on the opengl child, 
and draw child windows that are above the opengl child to that (in addition 
to the "base" window), if it intersects. Would be harsh on performance, but 
ony when its intersecting.

Another idea was to somehow put the opengl window behind the parent window, 
and draw some special colorkey to "cut out" the X11 window and show the 
OpenGL child underneath. Sort of like an Xv overlay. That way, when win32 
windows draw on top of the win32 opengl child, the colorkey won't be applied, 
and the x11 child will be hidden. I'm just not sure if that's possible.

Short of that, I've thought about using an actual Xv overlay, but I can't find 
anywhere to get a drawable to redirect OpenGL to. Seems the only way to draw 
to such an overlay is with XPutImage (and redirecting OpenGL to a pixmap has 
speed issues, in addition to updating issues).

More information about the wine-devel mailing list