Surface/Texture Formats and colour masking
Does anybody know of a function in DX8 that will give me back all of the colour masks for a specified format.
e.g. if the format is D3DFMT_A8R8G8B8 then the red mask cound be 0x00FF0000, but if I was using D3DFMT_A1R5G5B5 then the mask would be 0x7C00.
Something similar to the DX7 surface desciption ddpfPixelFormat.dwxBitMask.
Thanks
Scott
You''ll have to roll your own lookup table for that, DX8 no longer has it implemented. You might also want to store it in a more useful format, say, number of bits and the start bit.
Fortunately, there aren''t that many pixel formats...
- JQ
Full Speed Games. Coming soon.
Fortunately, there aren''t that many pixel formats...
- JQ
Full Speed Games. Coming soon.
Bummer...that is what I thought I might end up having to do
Can you explain this a bit more, I was going to create a function that pulled all the masks back (R, G, B & A), having a lovely large switch statement to choose between the formats?
quote:
You might also want to store it in a more useful format, say, number of bits and the start bit.
Can you explain this a bit more, I was going to create a function that pulled all the masks back (R, G, B & A), having a lovely large switch statement to choose between the formats?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement