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

Function ilImageToDxtcData

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

Source from the content-addressed store, hash-verified

2053
2054
2055ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format)
2056{
2057 ILint i, j;
2058 ILuint ImgID = ilGetInteger(IL_CUR_IMAGE);
2059 ILint ImgCount = ilGetInteger(IL_NUM_IMAGES);
2060 ILint MipCount;
2061 ILboolean ret = IL_TRUE;
2062
2063 for (i = 0; i <= ImgCount; ++i) {
2064 ilBindImage(ImgID);
2065 ilActiveImage(i);
2066
2067 MipCount = ilGetInteger(IL_NUM_MIPMAPS);
2068 for(j = 0; j <= MipCount; ++j) {
2069 ilBindImage(ImgID);
2070 ilActiveImage(i);
2071 ilActiveMipmap(j);
2072
2073 if (!ilSurfaceToDxtcData(Format))
2074 ret = IL_FALSE;
2075 }
2076 }
2077
2078 return ret;
2079}
2080
2081
2082//works like ilTexImage(), ie. destroys mipmaps etc (which sucks, but

Callers

nothing calls this directly

Calls 1

ilSurfaceToDxtcDataFunction · 0.85

Tested by

no test coverage detected