MCPcopy Create free account
hub / github.com/DentonW/DevIL / ilTexSubImage_

Function ilTexSubImage_

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

Internal version of ilTexSubImage.

Source from the content-addressed store, hash-verified

260
261// Internal version of ilTexSubImage.
262ILAPI ILboolean ILAPIENTRY ilTexSubImage_(ILimage *Image, void *Data)
263{
264 if (Image == NULL || Data == NULL) {
265 ilSetError(IL_INVALID_PARAM);
266 return IL_FALSE;
267 }
268 if (!Image->Data) {
269 Image->Data = (ILubyte*)ialloc(Image->SizeOfData);
270 if (Image->Data == NULL)
271 return IL_FALSE;
272 }
273 memcpy(Image->Data, Data, Image->SizeOfData);
274 return IL_TRUE;
275}
276
277
278//! Returns a pointer to the current image's data.

Callers 1

ILAPIENTRY ilSetDataFunction · 0.85

Calls 1

ilSetErrorFunction · 0.85

Tested by

no test coverage detected