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

Function ilSurfaceToDxtcData

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

Source from the content-addressed store, hash-verified

2026
2027
2028ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format)
2029{
2030 ILuint Size;
2031 ILubyte* Data;
2032 ilFreeSurfaceDxtcData();
2033
2034 Size = ilGetDXTCData(NULL, 0, Format);
2035 if (Size == 0) {
2036 return IL_FALSE;
2037 }
2038
2039 Data = (ILubyte*)ialloc(Size);
2040
2041 if (Data == NULL)
2042 return IL_FALSE;
2043
2044 ilGetDXTCData((void*)Data, Size, Format);
2045
2046 //These have to be after the call to ilGetDXTCData()
2047 iCurImage->DxtcData = Data;
2048 iCurImage->DxtcFormat = Format;
2049 iCurImage->DxtcSize = Size;
2050
2051 return IL_TRUE;
2052}
2053
2054
2055ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format)

Callers 1

ilImageToDxtcDataFunction · 0.85

Calls 1

ilFreeSurfaceDxtcDataFunction · 0.85

Tested by

no test coverage detected