MCPcopy Create free account
hub / github.com/DentonW/DevIL / Check16BitComponents

Function Check16BitComponents

DevIL/src-IL/src/il_dds.cpp:212–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212void Check16BitComponents(DDSHEAD *Header)
213{
214 if (Header->RGBBitCount != 32)
215 Has16BitComponents = IL_FALSE;
216 // a2b10g10r10 format
217 if (Header->RBitMask == 0x3FF00000 && Header->GBitMask == 0x000FFC00 && Header->BBitMask == 0x000003FF
218 && Header->RGBAlphaBitMask == 0xC0000000)
219 Has16BitComponents = IL_TRUE;
220 // a2r10g10b10 format
221 else if (Header->RBitMask == 0x000003FF && Header->GBitMask == 0x000FFC00 && Header->BBitMask == 0x3FF00000
222 && Header->RGBAlphaBitMask == 0xC0000000)
223 Has16BitComponents = IL_TRUE;
224 else
225 Has16BitComponents = IL_FALSE;
226 return;
227}
228
229
230ILubyte iCompFormatToBpp(ILenum Format)

Callers 1

iLoadDdsInternalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected