William Horvath (@whrvt) commented about dlls/winex11.drv/opengl.c:
- if (!(gl = opengl_drawable_create( sizeof(*gl), &x11drv_surface_funcs, format, hwnd ))) return FALSE;
if (!(window = x11drv_client_surface_create( hwnd, &client ))) return FALSE;
gl = opengl_drawable_create( sizeof(*gl), &x11drv_surface_funcs, format, client );
client_surface_release( client );
if (!gl) return FALSE; gl->rect = rect; gl->hdc = hdc;
gl->colormap = XCreateColormap( gdi_display, get_dummy_parent(), fmt->visual->visual, (fmt->visual->class == PseudoColor || fmt->visual->class == GrayScale || fmt->visual->class == DirectColor) ? AllocAll : AllocNone );
- gl->window = create_client_window( hwnd, fmt->visual, gl->colormap );
- if (gl->window) gl->drawable = pglXCreateWindow( gdi_display, fmt->fbconfig, gl->window, NULL );
- if (!gl->drawable)
- if (!(gl->drawable = pglXCreateWindow( gdi_display, fmt->fbconfig, window, NULL )))
This `pglXCreateWindow` will always result in a `BadMatch` for visuals/formats which are incompatible with the default (which are used unconditionally now in `x11drv_client_surface_create`), since AFAIK it needs to be compatible with the surface configuration.
See [gl.c](/uploads/8b7452de504d3eff1c7d7d39040dbaa6/gl.c) for an example.