Drop the PFD_GENERIC_ACCELERATED flag?

Peter Beutner p.beutner at gmx.net
Wed Nov 16 18:05:49 CST 2005


Raphael schrieb:
> You can provide a similar behavior with opengl:
> 
> from
> http://rzaix12.rrz.uni-hamburg.de/doc_link/en_US/a_doc_lib/libs/openglrf/glXGetFBConfigAttrib.htm
> 
> <snip>
> GLX_CONFIG_CAVEAT  This attribute defines any problems that the GLX FBConfig 
> may have:
> 
>  GLX_NONE 
> No caveats 
> GLX_SLOW_CONFIG 
> A drawable with this configuration may run at reduced performance. 
> GLX_NON_CONFORMANT_CONFIG 
> A drawable with this configuration will not pass the required OpenGL 
> conformance tests.
> <snip>
> 
> as example you can see wglGetPixelFormatAttribivARB implementation in 
> dlls/opengl/wgl_ext.c :)

Thanks for the hint. :)
So something like the attached patch would be ok?

Note: I'm not really sure if both PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED should be
set for GLX_SLOW_CONFIG or only the latter one. Or only PFD_GENERIC_FORMAT.
If you think of PFD_GENERIC_FORMAT as "really slow" and PFD_GENERIC_ACCELERATED as
"faster, but still slow", I dunno how that should be compared to GLX_SLOW_CONFIG ;)

And I don't know enough about OpenGL programming(in fact almost nothing) to say what flag
in general is used to be checked by applications.

Perhaps just place a TRACE in the GLX_SLOW_CONFIG path to better catch it if there is a an
application which might have trouble with this?

Peter

> 
> But you must test what windows provide and on which configs 
> 
> Regards,
> Raphael
> 
> 
> ------------------------------------------------------------------------
> 
> 
-------------- next part --------------
diff --git a/dlls/x11drv/opengl.c b/dlls/x11drv/opengl.c
index e2fff7e..7763c21 100644
--- a/dlls/x11drv/opengl.c
+++ b/dlls/x11drv/opengl.c
@@ -358,11 +358,15 @@ int X11DRV_DescribePixelFormat(X11DRV_PD
   ppfd->nVersion = 1;
 
   /* These flags are always the same... */
-  ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_GENERIC_ACCELERATED;
-  /* Now the flags extraced from the Visual */
+  ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
+  /* Now the flags extracted from the Visual */
 
   wine_tsx11_lock();
 
+  pglXGetFBConfigAttrib(gdi_display, cur, GLX_CONFIG_CAVEAT, &value);
+  if(value == GLX_SLOW_CONFIG)
+      ppfd->dwFlags |= PFD_GENERIC_ACCELERATED;
+
   pglXGetFBConfigAttrib(gdi_display, cur, GLX_DOUBLEBUFFER, &value); if (value) ppfd->dwFlags |= PFD_DOUBLEBUFFER;
   pglXGetFBConfigAttrib(gdi_display, cur, GLX_STEREO, &value); if (value) ppfd->dwFlags |= PFD_STEREO;
 


More information about the wine-devel mailing list