On Mon Sep 22 09:29:27 2025 +0000, Rémi Bernon wrote:
I think we should fixup the 16bpp pixel formats in the list (for instance replacing RGB565 with RGBA5551), or extend, or hardcode the list, for memory DCs, rather than returning a fake index from only one of the functions.
Extending or hardcoding the list for memory DCs is probably the best option. Right now I've done it in a very ugly but easy way. I also looked at adding a fake pixel format to the list of pixel formats in winex11, but the list there had a whole bunch of GLX information for each format, which I couldn't really fill in. The PIXELFORMATDESCRIPTOR was derived from the GLX info, so I'd also need to add a whole bunch of special cases to make that work — and I might have needed to edit the other Wine drivers as well. Hence the ugly solution.
Hardcoding the PFD_DRAW_TO_BITMAP DCs seems less ugly, and GDI's software OpenGL only supports 28 different RGBA formats in total (see the attachment on the last thread). I don't think we need full coverage, so it shouldn't be too much work.