| 2026 | |
| 2027 | |
| 2028 | ILAPI 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 | |
| 2055 | ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format) |
no test coverage detected