WGL: rewrite ChoosePixelFormat

Roderick Colenbrander thunderbird2k at gmx.net
Wed Aug 8 18:23:45 CDT 2007


Hi,

This patch rewrites ChoosePixelFormat. The function now behaves more like what 
is specified on MSDN. The function needs to do its best effort to find a 
pixelformat that meets certain requirements. It is allowed to return a format 
that doesn't meet all the given criteria.

Our previous implementation was too strict in this regard. The new version 
does it best matching the number of color bits / alpha / depth / stencil and 
aux buffers. (For instance before if you asked for 8 depth bits and our main 
visual lacked those, ChoosePixelFormat would fail.)

Further the code is now written in a way that it can handle future new 
pixelformats. Even if we might not get more formats inside Wine, it is nice 
for doing pixelformat/windowed opengl experiments.

Regards,
Roderick Colenbrander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Rewrite-ChoosePixelFormat-to-behave-more-like-the-sp.patch
Type: text/x-diff
Size: 10178 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070809/51e63ef9/0003-Rewrite-ChoosePixelFormat-to-behave-more-like-the-sp-0001.bin


More information about the wine-patches mailing list