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

Function ILAPIENTRY ilGetIntegerv

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

Sets Param equal to the current value of the Mode

Source from the content-addressed store, hash-verified

411
412//! Sets Param equal to the current value of the Mode
413void ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param)
414{
415 if (Param == NULL) {
416 ilSetError(IL_INVALID_PARAM);
417 return;
418 }
419
420 *Param = 0;
421
422 switch (Mode) {
423 // Integer values
424 case IL_COMPRESS_MODE:
425 *Param = ilStates[ilCurrentPos].ilCompression;
426 break;
427 case IL_CUR_IMAGE:
428 if (iCurImage == NULL) {
429 ilSetError(IL_ILLEGAL_OPERATION);
430 break;
431 }
432 *Param = ilGetCurName();
433 break;
434 case IL_FORMAT_MODE:
435 *Param = ilStates[ilCurrentPos].ilFormatMode;
436 break;
437 case IL_INTERLACE_MODE:
438 *Param = ilStates[ilCurrentPos].ilInterlace;
439 break;
440 case IL_KEEP_DXTC_DATA:
441 *Param = ilStates[ilCurrentPos].ilKeepDxtcData;
442 break;
443 case IL_ORIGIN_MODE:
444 *Param = ilStates[ilCurrentPos].ilOriginMode;
445 break;
446 case IL_MAX_QUANT_INDICES:
447 *Param = ilStates[ilCurrentPos].ilQuantMaxIndexs;
448 break;
449 case IL_NEU_QUANT_SAMPLE:
450 *Param = ilStates[ilCurrentPos].ilNeuSample;
451 break;
452 case IL_QUANTIZATION_MODE:
453 *Param = ilStates[ilCurrentPos].ilQuantMode;
454 break;
455 case IL_TYPE_MODE:
456 *Param = ilStates[ilCurrentPos].ilTypeMode;
457 break;
458 case IL_VERSION_NUM:
459 *Param = IL_VERSION;
460 break;
461
462 // Image specific values
463 case IL_ACTIVE_IMAGE:
464 case IL_ACTIVE_MIPMAP:
465 case IL_ACTIVE_LAYER:
466 *Param = iGetActiveNum(Mode);
467 break;
468
469 // Format-specific values
470 case IL_BMP_RLE:

Callers

nothing calls this directly

Calls 3

ilSetErrorFunction · 0.85
ilGetCurNameFunction · 0.85
iGetActiveNumFunction · 0.85

Tested by

no test coverage detected