Archived

This topic is now archived and is closed to further replies.

dansteph

DX8 D3DFMT_X8R8G8 incompatible ?

Recommended Posts

dansteph    122
the doc state that: "Note that render target formats are restricted to D3DFMT_X1R5G5B5, D3DFMT_R5G6B5, D3DFMT_X8R8G8B8, D3DFMT_A8R8G8B8." (direct3d reference/enumerated type/format) But in the d3dapp we see that it test for the 16 bpp mode about: D3DFMT_R5G6B5 D3DFMT_X1R5G5B5 D3DFMT_A1R5G5B5 for the 16 bpp modes so I wonder if: 1: the D3DFMT_A1R5G5B5 is really a legal target format ? 2: the D3DFMT_R8G8B8 is also legal ? I''m modyfying the d3dapp to go only fullscreen mode (in retail) with a config screen for the user so I''m ok if I test only those mode?: 16 bpp ------- D3DFMT_R5G6B5 D3DFMT_X1R5G5B5 D3DFMT_A1R5G5B5 32bpp ------ D3DFMT_R8G8B8 D3DFMT_X8R8G8B8 D3DFMT_A8R8G8B8 Dan "loving when doc does not say what we see in sample"

Share this post


Link to post
Share on other sites
EbonySeraph    122
Seems wierd for me to be adding anther question to the one already asked... but does the X parameter mean that the bit is just dropped?

"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.

Share this post


Link to post
Share on other sites
S1CA    1418
1. Answering dansteph''s first question and EbonySeraph''s question: the X on the format means that the bit is "undefined" - it is still present in the data just not used for anything. Many graphics cards can''t do single bit destination alpha (1555), but can use 1555 with 1 bit alpha as a texture format. Those will accept X1R5G5B5 as a render target - the alpha bit is there, but it''s meaningless - the chip won''t do anything with it.

2. 24bit R8G8B8 backbuffers for 3D rendering are not supported by most hardware. About the only hardware which does support them is Matrox cards (G400).

If this stuff bothers you, use CheckDeviceFormat(), CheckDeviceType(), CheckDepthStencilMatch() and check all the formats you know about (provided you''re prepared to handle any consequences). We have an array sorted into preference order of all the D3D formats we''re prepared to support - we then perform the checks against all of them to determine which will work.

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites