On Thu Feb 5 10:50:24 2026 +0000, Jacek Caban wrote:
I think that the `functions[]` array really should be static. Initializing it like that on every call only to use a single entry seems ridiculous to me. That, combined with the extensive use of unnecessary `USE_GL_EXT` tricks, makes me question whether this is really the right representation of extensions. One alternative would be to have an enum representing all known extensions. Converting from a string would then be just a `bsearch` away, and with that, things like `add_extension` would be as simple as `ctx->extensions[ext] = set`, `init_wgl_extensions` could use a proper loop, etc. The function registry could just have a list of extensions' enum values. Right, I initially thought it would make the contexts much bigger and liked bitfields better from a strict compilation point of view (array indexes are easier to make mistake with), but I guess it's alright after all.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10019#note_128857