Rémi Bernon (@rbernon) commented about dlls/winex11.drv/opengl.c:
- case GLX_SWAP_COPY_OML: pf->swap_method = WGL_SWAP_COPY_ARB; break;
- case GLX_SWAP_UNDEFINED_OML: pf->swap_method = WGL_SWAP_UNDEFINED_ARB; break;
- default: { ERR("Unexpected swap method %x.\n", value); pf->swap_method = 0; }
- }
- }
- else pf->swap_method = -1;
- if (pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_TRANSPARENT_TYPE, &value)) pf->transparent = -1;
- else pf->transparent = value != GLX_NONE;
- if (render_type & GLX_RGBA_BIT) pf->pixel_type = WGL_TYPE_RGBA_ARB;
- else if (render_type & GLX_COLOR_INDEX_BIT) pf->pixel_type = WGL_TYPE_COLORINDEX_ARB;
- else if (render_type & GLX_RGBA_FLOAT_BIT) pf->pixel_type = WGL_TYPE_RGBA_FLOAT_ATI;
- else if (render_type & GLX_RGBA_FLOAT_ATI_BIT) pf->pixel_type = WGL_TYPE_RGBA_FLOAT_ATI;
- else if (render_type & GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT) pf->pixel_type = WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT;
- else { ERR("unexpected RenderType(%x)\n", render_type); pf->pixel_type = WGL_TYPE_RGBA_ARB; }
Regardless of the code style of the functions around I think it'd be better to use the more general winex11 style for these changes, and move toward some unification.
You can probably use the commit before this one, which is otherwise rather trivial, to cleanup `describe_pixel_format` style (indentation and variable names) before making these additions if you like.