DevIL Documentation | Home | Previous | Next |
The ilCopyPixels function copies a block of pixels to a user-defined buffer.
ILvoid ilCopyPixels(
ILuint XOff,
ILuint YOff,
ILuint ZOff,
ILuint Width,
ILuint Height,
ILuint Depth,
ILenum Format,
ILenum Type,
ILvoid *Data
);
ilCopyPixels has very simple behaviour. It simply copies a block of pixels from the current image to the Data buffer. XOff, YOff and ZOff can be used to skip a certain number of pixels in each respective direction. If XOff + Width, YOff + Height and/or ZOff + Depth is greater than the current image's width, height or depth, only the current image's width, height or depth number of pixels will be copied to Data.
IL_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
IL_INVALID_CONVERSION - Format did not match the current image's format. Use ilGetInteger to obtain the current image's format.
ilGenImages, ilBindImage, ilGetInteger