WGL: proper stereo / double buffering support for ChoosePixelFormat

Chris Robinson chris.kcat at gmail.com
Sun Aug 12 14:35:51 CDT 2007


On Sunday 12 August 2007 05:44:31 am Roderick Colenbrander wrote:
>          pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig,
> GLX_DOUBLEBUFFER, &value);
> -        if (value) dwFlags |= PFD_DOUBLEBUFFER; 
> -        if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) &&
> ((ppfd->dwFlags^dwFlags) & PFD_DOUBLEBUFFER))
> -        { 
> -            TRACE("dbl buffer mismatch for iPixelFormat=%d\n", i+1);
> +        if( (value & PFD_DOUBLEBUFFER) && (ppfd->dwFlags &&
> PFD_DOUBLEBUFFER) ) {

This change doesn't look quite right. 'value' will be set to true or false, it 
won't have the PFD_DOUBLEBUFFER flag set coming from a GLX function. And 
checking the ppfd->dwFlags should use a single &, not a double &&.

Also, even with those fixes, it'll only attempt to match when the doublebuffer 
flag is set on both the fbconfig and the wanted pixel format, not if it's 
unset on both, or if it's supposed to be ignored. As well, the check will 
preempt the other fields if a doublebuffer match was already found.

Same with the stereo flag.



More information about the wine-devel mailing list