http://bugs.winehq.org/show_bug.cgi?id=20808
--- Comment #4 from Roderick Colenbrander thunderbird2k@gmail.com 2009-11-24 08:24:17 --- I will shortly describe the problem but it needs to be fixed in the X11 server.
On Windows all controls are win32 windows, so buttons, labels, text boxes and so on. In Wine we only create an X11 window for the top-level window (and the client area). A button is just drawn on top of the top-level window. OpenGL doesn't like sharing an X11 window and really needs its own window.
In case of child window rendering we create a separate X11 window to which we render all 3D. The contents of this window which just acts as a buffer is copied back to the top-level window. The tricky thing is that the window is made unvisible using the Composite extension. 3D drivers which support 'redirected GL rendering' (which is needed for compiz and friends) can render properly to this window. A normal hidden window doesn't has an undefined framebuffer content.
You might wonder why we don't just place an X11 subwindow on top of the x11 top-level window? This works but causes issues related to events. For instance when you cover a window with another window we receive X11 events. We map these X11 events to win32 ones but the 'GL window' doesn't exist on the win32 side and this can cause issues for apps.
The hack which I posted uses the X11 window hack and I required this for a program at my university. There is no efficient alternative.