Copies everything from Src to the current bound image.
| 1045 | |
| 1046 | //! Copies everything from Src to the current bound image. |
| 1047 | ILboolean 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. |
nothing calls this directly
no test coverage detected