On 7/23/06, Peter Trauner <[EMAIL PROTECTED]> wrote:

Localized the problem in the window creation/visual selection code.
(src/unix/video-drivers/glxtool.c/findVisualGlX)

A quick fix allows correct gldblbuffer switch function,
and ignores default/native visual id (since this isn't using double
buffering)

Somebody more familiar in this area to do a better fix?

I am certainly not familiar with that code, but I am not sure
this is the right place to override nativeVisualID.

findVisualGlX is only called from xgl.c/xgl_open_display.
Before being called, nativeVisualID's value either is -1 or
the window's visual.

My understanding of the behaviour of findVisualGlX is that
if the nativeVisualID is >= 0 then it tries to use it.  Which
will fail (see your log).  So I think a better value for
nativeVisualID would be -1.  In that case a more correct
patch would be to comment out lines 114-115 of xgl.c

114:    if (XGetWindowAttributes(display, window, &window_attributes) != 0)
115:       glCaps.nativeVisualID = window_attributes.visual->visualid;

I have no way to check here.  Can you give it a try?

Once more, I don't know well enough the code to say if
it is correct even if it works for you :)

Laurent

--- src/unix/video-drivers/glxtool.c~   2005-09-16 17:19:01.000000000 +0200
+++ src/unix/video-drivers/glxtool.c    2006-07-23 14:30:33.000000000 +0200
@@ -186,6 +186,8 @@

      if(pOwnWin) ownwin=*pOwnWin;

+    glCaps->nativeVisualID=0;
+
      do {
              if(verbose)
             {

_______________________________________________
Xmame mailing list
[email protected]
http://toybox.twisted.org.uk/mailman/listinfo/xmame

Reply via email to