[RFC] winex11.drv: Prepare ChoosePixelFormat() for code rewrite.

Tomas Carnecky tom at dbservice.com
Sun Jul 15 16:21:15 CDT 2007


This partial rewrite aims at cleaning up the pixelformat code. Windows
sometimes advertises one or more almost identical and completely
compatible pixelformats. These pixelformats differ in attributes like
color-bits, but I suspect the driver developers do that only to work
around buggy applications that don't follow the spec.
This rewrite will also simplify the pixelformat code by removing
redundant blocks and moving the core functionality to a few main functions.

This is the first patch that simplifies ChoosePixelFormat() by
converting the PFD structure to a list of WGL attributes and then using
a function to choose the pixelformat. This function doesn't do anything
as we support only one pixelformat, but this function will be shared
with wglChoosePixelFormat() once the infrastructure for that is in place.

I also have a second patch that converts DescribePixelFormat() to use
the same approach, eg. querying the pixelformat attributes using a WGL
attribute list and then copying the values back the the PFD structure.

---
 dlls/winex11.drv/opengl.c |  155
+++++++++++++++++---------------------------
 1 files changed, 60 insertions(+), 95 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ca47e2ae34d592115241fe1fbd1a7c35db39d8f1.diff
Type: text/x-patch
Size: 6204 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070715/71bcef03/ca47e2ae34d592115241fe1fbd1a7c35db39d8f1.bin


More information about the wine-patches mailing list