MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / pixel_format_category

Function pixel_format_category

platform/mac/pixelformat.cpp:623–639  ·  view source on GitHub ↗

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 */

Source from the content-addressed store, hash-verified

621 4. Accelerated pixel formats that are non displayable
622 */
623static 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
642static CFComparisonResult pixel_format_comparator(const void *val1, const void *val2, void *context)

Callers 1

pixel_format_comparatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected