Hi all, It seems most games do not even bother to do a texture enumeration before requiring a texture of a given pixel format. Thus we need to add some conversion functions... And well, if they exist, advertise it :-) Changelog: If we support 'non-native' texture format, advertise it Lionel -- Lionel Ulmer - http://www.bbrox.org/
--- ../wine_base/dlls/ddraw/d3ddevice/mesa.c Sun Dec 15 22:06:43 2002 +++ dlls/ddraw/d3ddevice/mesa.c Mon Dec 16 22:45:55 2002 @@ -367,8 +367,8 @@ TRACE("Enumerating GL_RGBA packed GL_UNSIGNED_SHORT_5_5_5_1 (16)\n"); pformat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS; pformat->u1.dwRGBBitCount = 16; - pformat->u2.dwRBitMask = 0x0000F800; - pformat->u3.dwGBitMask = 0x000007C0; + pformat->u2.dwRBitMask = 0x0000F800; + pformat->u3.dwGBitMask = 0x000007C0; pformat->u4.dwBBitMask = 0x0000003E; pformat->u5.dwRGBAlphaBitMask = 0x00000001; if (cb_1) if (cb_1(&sdesc , context) == 0) return DD_OK; @@ -377,10 +377,30 @@ TRACE("Enumerating GL_RGBA packed GL_UNSIGNED_SHORT_4_4_4_4 (16)\n"); pformat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS; pformat->u1.dwRGBBitCount = 16; - pformat->u2.dwRBitMask = 0x0000F000; - pformat->u3.dwGBitMask = 0x00000F00; + pformat->u2.dwRBitMask = 0x0000F000; + pformat->u3.dwGBitMask = 0x00000F00; pformat->u4.dwBBitMask = 0x000000F0; pformat->u5.dwRGBAlphaBitMask = 0x0000000F; + if (cb_1) if (cb_1(&sdesc , context) == 0) return DD_OK; + if (cb_2) if (cb_2(pformat, context) == 0) return DD_OK; + + TRACE("Enumerating GL_RGBA packed GL_UNSIGNED_SHORT_1_5_5_5 (16)\n"); + pformat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS; + pformat->u1.dwRGBBitCount = 16; + pformat->u2.dwRBitMask = 0x00007C00; + pformat->u3.dwGBitMask = 0x000003E0; + pformat->u4.dwBBitMask = 0x0000001F; + pformat->u5.dwRGBAlphaBitMask = 0x00008000; + if (cb_1) if (cb_1(&sdesc , context) == 0) return DD_OK; + if (cb_2) if (cb_2(pformat, context) == 0) return DD_OK; + + TRACE("Enumerating GL_RGBA packed GL_UNSIGNED_SHORT_4_4_4_4 (ARGB) (16)\n"); + pformat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS; + pformat->u1.dwRGBBitCount = 16; + pformat->u2.dwRBitMask = 0x00000F00; + pformat->u3.dwGBitMask = 0x000000F0; + pformat->u4.dwBBitMask = 0x0000000F; + pformat->u5.dwRGBAlphaBitMask = 0x0000F000; if (cb_1) if (cb_1(&sdesc , context) == 0) return DD_OK; if (cb_2) if (cb_2(pformat, context) == 0) return DD_OK;