On Monday 09 May 2011 20:55:21 Ričardas Barkauskas wrote:
- modes16bpp_cnt = 0;
- U2(ddsd.ddpfPixelFormat).dwRBitMask = 0x0000;
- U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x0000;
- U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x0000;
Please add an additional test that passes in non-null flags that don't match standard R5G6B5.
if ((DDSD->dwFlags & DDSD_PIXELFORMAT) && (DDSD-
u4.ddpfPixelFormat.dwFlags & DDPF_RGB) )
if(pixelformat.u1.dwRGBBitCount != DDSD-
u4.ddpfPixelFormat.u1.dwRGBBitCount) continue;
For the fun of it you could see what happens when you pass a non-RGB format(e.g. a DDPF_YUV or DDPF_BUMPDUDV one) to EnumPixelFormat, but that's not really a requirement for me. Afaics the DDPF_RGB check is needed anyway to enumerate 8 bit palettized formats properly.
A YUV primary format may even make sense. A BUMPDUDV one not really.
On 05/09/2011 10:11 PM, Stefan Dösinger wrote:
On Monday 09 May 2011 20:55:21 Ričardas Barkauskas wrote:
- modes16bpp_cnt = 0;
- U2(ddsd.ddpfPixelFormat).dwRBitMask = 0x0000;
- U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x0000;
- U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x0000;
Please add an additional test that passes in non-null flags that don't match standard R5G6B5.
I'm not exactly sure what you mean with this. The other test has mask of R5G5B5. The one that's missing is R5G6B5, but I don't think it's needed.
if ((DDSD->dwFlags & DDSD_PIXELFORMAT) && (DDSD-
u4.ddpfPixelFormat.dwFlags & DDPF_RGB) )
if(pixelformat.u1.dwRGBBitCount != DDSD-
u4.ddpfPixelFormat.u1.dwRGBBitCount) continue;
For the fun of it you could see what happens when you pass a non-RGB format(e.g. a DDPF_YUV or DDPF_BUMPDUDV one) to EnumPixelFormat, but that's not really a requirement for me. Afaics the DDPF_RGB check is needed anyway to enumerate 8 bit palettized formats properly.
A YUV primary format may even make sense. A BUMPDUDV one not really.
My bad. Didn't think of testing this before. Now it is to strict.
Ricardas Barkauskas REalm
Please add an additional test that passes in non-null flags that
don't match
standard R5G6B5.
I'm not exactly sure what you mean with this. The other test has mask of R5G5B5. The one that's missing is R5G6B5, but I don't think it's needed.
E.g. a red mask of 0xf0f0, green 0x0f00 and blue 0x000f. The purpose is to find out if windows listens to non-zero masks. If it does you'll get 0 formats reported. If it doesn't you'll get the usual count.