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

Function iCompFormatToBpp

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

Source from the content-addressed store, hash-verified

228
229
230ILubyte iCompFormatToBpp(ILenum Format)
231{
232 //non-compressed (= non-FOURCC) codes
233 if (Format == PF_LUMINANCE || Format == PF_LUMINANCE_ALPHA || Format == PF_ARGB)
234 return Head.RGBBitCount/8;
235
236 //fourcc formats
237 else if (Format == PF_RGB || Format == PF_3DC || Format == PF_RXGB)
238 return 3;
239 else if (Format == PF_ATI1N)
240 return 1;
241 //else if (Format == PF_R16F)
242 // return 2;
243 else if (Format == PF_A16B16G16R16 || Format == PF_A16B16G16R16F
244 || Format == PF_G32R32F)
245 return 8;
246 else if (Format == PF_A32B32G32R32F)
247 return 16;
248 else //if (Format == PF_G16R16F || Format == PF_R32F || dxt)
249 return 4;
250}
251
252
253ILubyte iCompFormatToBpc(ILenum Format)

Callers 3

iLoadDdsCubemapInternalFunction · 0.85
AdjustVolumeTextureFunction · 0.85
ReadMipmapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected