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

Function ILAPIENTRY ilCloneCurImage

DevIL/src-IL/src/il_devil.cpp:1091–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1089
1090
1091ILuint ILAPIENTRY ilCloneCurImage()
1092{
1093 ILuint Id;
1094 ILimage *CurImage;
1095
1096 if (iCurImage == NULL) {
1097 ilSetError(IL_ILLEGAL_OPERATION);
1098 return 0;
1099 }
1100
1101 ilGenImages(1, &Id);
1102 if (Id == 0)
1103 return 0;
1104
1105 CurImage = iCurImage;
1106
1107 ilBindImage(Id);
1108 ilTexImage(CurImage->Width, CurImage->Height, CurImage->Depth, CurImage->Bpp, CurImage->Format, CurImage->Type, CurImage->Data);
1109 ilCopyImageAttr(iCurImage, CurImage);
1110
1111 iCurImage = CurImage;
1112
1113 return Id;
1114}
1115
1116
1117// Like ilTexImage but doesn't destroy the palette.

Callers

nothing calls this directly

Calls 2

ilSetErrorFunction · 0.85
ilCopyImageAttrFunction · 0.85

Tested by

no test coverage detected