MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY ilLoadData

Function ILAPIENTRY ilLoadData

DevIL/src-IL/src/il_rawdata.cpp:22–43  ·  view source on GitHub ↗

Reads a raw data file

Source from the content-addressed store, hash-verified

20
21//! Reads a raw data file
22ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
23{
24 ILHANDLE RawFile;
25 ILboolean bRaw = IL_FALSE;
26
27 // No need to check for raw data
28 /*if (!iCheckExtension(FileName, "raw")) {
29 ilSetError(IL_INVALID_EXTENSION);
30 return bRaw;
31 }*/
32
33 RawFile = iopenr(FileName);
34 if (RawFile == NULL) {
35 ilSetError(IL_COULD_NOT_OPEN_FILE);
36 return bRaw;
37 }
38
39 bRaw = ilLoadDataF(RawFile, Width, Height, Depth, Bpp);
40 icloser(RawFile);
41
42 return bRaw;
43}
44
45
46//! Reads an already-opened raw data file

Callers

nothing calls this directly

Calls 1

ilSetErrorFunction · 0.85

Tested by

no test coverage detected