Hi all,

By trying to get a Window modeller that uses OpenGL to run in Wine, I
found what seems to be a BIG problem : each GLX context needs to be
attached to a X drawable (a window or a GLXPixmap).

The problem is that ALL windows created by the application by calling
CreateWindowEx share the same X window. This means that all contexts
that the application create are drawing at the same position and
overwrite everything else on the screen (menus, other windows, ...).
So, with the current situation, only single window OpenGL applications
(i.e. games) will run correctly in Wine.

I could add the same 'hack' that is done to simulate windows (i.e. use
some sort of clipping in OpenGL) but this has its own limitations when
the contexts are set-up in double buffer mode (that is the most common
case) : when one context is 'swapped', it swaps ALL other contexts.
Moreover, I the glViewport and glScissor calls (the OpenGL equivalents
of ClipRectangles) does not matter for the Swap : everything will be
erased by the back-buffer...

So, the only solution that could work is an ugly hack : simulate
windows using GLXPixmaps and simulate the wglSwapBuffers by copying
the pixmap at the window position... But well, this would be so slow
(I fear that rendering in pixmaps is not accelerated in many of the
current OpenGL drivers) to be completely useless.

Out of curiosity, why was this solution choosen ? Why not a Windows
window <-> X window one to one corespondance ?

-- 
               Lionel Ulmer   -   [EMAIL PROTECTED]
    My Advogato Wine diary : http://www.advogato.org/person/bbrox/

Reply via email to