3DWorld (268/272)

From:Peter McGavin
Date:31 May 2000 at 12:56:10
Subject:Re: joypad support wont work in wipeout.

Hans-Joerg Frieden <hfrieden@uni-trier.de> wrote:
>> Well, if (16bit) R5G6B5 textures are supported in hardware on
>> Permedia2, then it's news to me. I tried it originally with Warp3D,
>> but W3D_GetTexFmtInfo() returned a code indicating "unsupported".
>
>I was quite sure it supports these; there might be a bug in the
>W3D_GetTexFmtInfo() function. I will have a look at it...

I just has another look at the Wipeout2097 code, at least the MPEG
player initialisation part. It's supposed to use 16bit textures if
W3D_GetTexFmtInfo() reports they are supported by hardware. However I
have never observed it selecting 16bit textures on Permedia2.

OK, it is likely my fault after all, but I'm not certain.

I'll append my relevant source below for you to look at. My first
(probable) mistake is that I passed a bit mask for dest_pixfmt to
W3D_GetTexFmtInfo(), whereas it is probably supposed to be a bit
number. On the other hand, I just tried changing it to a bit number
and the result is the same. It still reports hardware support only
for 15bit textures, not 16bit. In my tests, dest_pixfmt is
PIXFMT_RGB16 and texfmt turns out to be W3D_A1R5G5B5.

2nd, my code tests W3D_R5G6B5, but not W3D_B5G6R5, W3D_R5G6B5PC nor
W3D_B5G6R5PC. Does the Permedia2 use one of those backwards formats
for 16bit hardware textures?

Anyway, if W3D_GetTexFmtInfo() in a future version of Warp3D reports
R5G6B5 textures are supported by hardware, then Wipeout2097 will
automatically use R5G6B5 instead of 15bit, and MPEGs will look a lot
better.



Peter McGavin. (p.mcgavin@irl.cri.nz)

------------------------------------------------------------------------
dest_pixfmt = GetCyberMapAttr (w3dbitmap, CYBRMATTR_PIXFMT);
if (W3D_GetTexFmtInfo (context, W3D_R5G6B5, 1 << dest_pixfmt) & W3D_TEXFMT_FAST)
texfmt = W3D_R5G6B5;
else if (W3D_GetTexFmtInfo (context, W3D_A1R5G5B5, 1 << dest_pixfmt) & W3D_TEXFMT_FAST)
texfmt = W3D_A1R5G5B5;
else if (W3D_GetTexFmtInfo (context, W3D_A4R4G4B4, 1 << dest_pixfmt) & W3D_TEXFMT_FAST)
texfmt = W3D_A4R4G4B4;
else if (W3D_GetTexFmtInfo (context, W3D_R5G6B5, 1 << dest_pixfmt) & W3D_TEXFMT_SUPPORTED)
texfmt = W3D_R5G6B5;
else if (W3D_GetTexFmtInfo (context, W3D_A1R5G5B5, 1 << dest_pixfmt) & W3D_TEXFMT_SUPPORTED)
texfmt = W3D_A1R5G5B5;
else if (W3D_GetTexFmtInfo (context, W3D_A4R4G4B4, 1 << dest_pixfmt) & W3D_TEXFMT_SUPPORTED)
texfmt = W3D_A4R4G4B4;
else {
error ("No suitable 16-bit TEXFMT available for the selected Screen Mode");