The docs for WGL_ARB_pixel_format say: Indices are assigned to pixel formats in the following order: 1. Accelerated pixel formats that are displayable 2. Accelerated pixel formats that are displayable and which have extended attributes 3. Generic pixel formats 4. Accelerated pixel formats that are non displayable */
| 621 | 4. Accelerated pixel formats that are non displayable |
| 622 | */ |
| 623 | static int pixel_format_category(pixel_format pf) |
| 624 | { |
| 625 | /* non-displayable */ |
| 626 | if (!pf.window) |
| 627 | return 4; |
| 628 | |
| 629 | /* non-accelerated a.k.a. software a.k.a. generic */ |
| 630 | if (!pf.accelerated) |
| 631 | return 3; |
| 632 | |
| 633 | /* extended attributes that can't be represented in PIXELFORMATDESCRIPTOR */ |
| 634 | if (color_modes[pf.color_mode].is_float) |
| 635 | return 2; |
| 636 | |
| 637 | /* accelerated, displayable, no extended attributes */ |
| 638 | return 1; |
| 639 | } |
| 640 | |
| 641 | |
| 642 | static CFComparisonResult pixel_format_comparator(const void *val1, const void *val2, void *context) |
no outgoing calls
no test coverage detected