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

Function IwiGetFormat

DevIL/src-IL/src/il_iwi.cpp:225–253  ·  view source on GitHub ↗

Helper function to convert IWI formats to DevIL formats and Bpp.

Source from the content-addressed store, hash-verified

223
224// Helper function to convert IWI formats to DevIL formats and Bpp.
225ILenum IwiGetFormat(ILubyte Format, ILubyte *Bpp)
226{
227 switch (Format)
228 {
229 case IWI_ARGB8:
230 *Bpp = 4;
231 return IL_BGRA;
232 case IWI_RGB8:
233 *Bpp = 3;
234 return IL_BGR;
235 case IWI_ARGB4:
236 *Bpp = 4;
237 return IL_BGRA;
238 case IWI_A8:
239 *Bpp = 1;
240 return IL_ALPHA;
241 case IWI_DXT1:
242 *Bpp = 4;
243 return IL_RGBA;
244 case IWI_DXT3:
245 *Bpp = 4;
246 return IL_RGBA;
247 case IWI_DXT5:
248 *Bpp = 4;
249 return IL_RGBA;
250 }
251
252 return 0; // Will never reach this.
253}
254
255
256// Function to intialize the mipmaps and determine the number of mipmaps.

Callers 1

iLoadIwiInternalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected