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

Function ILAPIENTRY ilCopyImage

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

Copies everything from Src to the current bound image.

Source from the content-addressed store, hash-verified

1045
1046//! Copies everything from Src to the current bound image.
1047ILboolean ILAPIENTRY ilCopyImage(ILuint Src)
1048{
1049 ILuint DestName = ilGetCurName();
1050 ILimage *DestImage = iCurImage, *SrcImage;
1051
1052 if (iCurImage == NULL || DestName == 0) {
1053 ilSetError(IL_ILLEGAL_OPERATION);
1054 return IL_FALSE;
1055 }
1056
1057 ilBindImage(Src);
1058 SrcImage = iCurImage;
1059 ilBindImage(DestName);
1060 ilTexImage(SrcImage->Width, SrcImage->Height, SrcImage->Depth, SrcImage->Bpp, SrcImage->Format, SrcImage->Type, SrcImage->Data);
1061 ilCopyImageAttr(DestImage, SrcImage);
1062
1063 return IL_TRUE;
1064}
1065
1066
1067// Creates a copy of Src and returns it.

Callers

nothing calls this directly

Calls 3

ilGetCurNameFunction · 0.85
ilSetErrorFunction · 0.85
ilCopyImageAttrFunction · 0.85

Tested by

no test coverage detected