| 1089 | |
| 1090 | |
| 1091 | ILuint 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. |
nothing calls this directly
no test coverage detected