Laurent Desnogues 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
A better solution in this area would be to improve taking of
nativeVisualID only if buffering matches.
(see patch below)
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?
Works.
Best Regards,
PeT
--- src/unix/video-drivers/glxtool.c~ 2006-07-23 18:08:47.000000000 +0200
+++ src/unix/video-drivers/glxtool.c 2006-07-24 08:02:26.000000000 +0200
@@ -186,7 +186,7 @@
if(pOwnWin) ownwin=*pOwnWin;
- glCaps->nativeVisualID=0;
+ // glCaps->nativeVisualID=0;
do {
if(verbose)
@@ -205,6 +205,11 @@
vgc.visual = findVisualIdByID(&visualList,
(int)(glCaps->nativeVisualID),
display, *pWin, verbose);
+ {
+ GLCapabilities caps2;
+ setGLCapabilities (display, vgc.visual, &caps2);
+ if (caps2.buffer!=glCaps->buffer) vgc.visual=NULL;
+ }
}
if(vgc.visual==NULL)
_______________________________________________
Xmame mailing list
[email protected]
http://toybox.twisted.org.uk/mailman/listinfo/xmame