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

Function ILAPIENTRY iGetIntegervImage

DevIL/src-IL/src/il_states.cpp:548–671  ·  view source on GitHub ↗

@TODO rename to ilGetImageIntegerv for 1.6.9 and make it public Sets Param equal to the current value of the Mode

Source from the content-addressed store, hash-verified

546//@TODO rename to ilGetImageIntegerv for 1.6.9 and make it public
547//! Sets Param equal to the current value of the Mode
548void ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param)
549{
550 ILimage *SubImage;
551 if (Image == NULL) {
552 ilSetError(IL_ILLEGAL_OPERATION);
553 return;
554 }
555 if (Param == NULL) {
556 ilSetError(IL_INVALID_PARAM);
557 return;
558 }
559 *Param = 0;
560
561 switch (Mode)
562 {
563 case IL_DXTC_DATA_FORMAT:
564 if (Image->DxtcData == NULL || Image->DxtcSize == 0) {
565 *Param = IL_DXT_NO_COMP;
566 break;
567 }
568 *Param = Image->DxtcFormat;
569 break;
570 ////
571 case IL_IMAGE_BITS_PER_PIXEL:
572 //changed 20040610 to channel count (Bpp) times Bytes per channel
573 *Param = (Image->Bpp << 3)*Image->Bpc;
574 break;
575 case IL_IMAGE_BYTES_PER_PIXEL:
576 //changed 20040610 to channel count (Bpp) times Bytes per channel
577 *Param = Image->Bpp*Image->Bpc;
578 break;
579 case IL_IMAGE_BPC:
580 *Param = Image->Bpc;
581 break;
582 case IL_IMAGE_CHANNELS:
583 *Param = Image->Bpp;
584 break;
585 case IL_IMAGE_CUBEFLAGS:
586 *Param = Image->CubeFlags;
587 break;
588 case IL_IMAGE_DEPTH:
589 *Param = Image->Depth;
590 break;
591 case IL_IMAGE_DURATION:
592 *Param = Image->Duration;
593 break;
594 case IL_IMAGE_FORMAT:
595 *Param = Image->Format;
596 break;
597 case IL_IMAGE_HEIGHT:
598 *Param = Image->Height;
599 break;
600 case IL_IMAGE_SIZE_OF_DATA:
601 *Param = Image->SizeOfData;
602
603 break;
604 case IL_IMAGE_OFFX:
605 *Param = Image->OffX;

Callers

nothing calls this directly

Calls 2

ilSetErrorFunction · 0.85
ilGetBppPalFunction · 0.85

Tested by

no test coverage detected