DevIL Documentation Home | Previous | Next

ilEnable, ilDisable

These functions enable or disable an OpenIL state.


ILboolean ilEnable(
  ILenum Mode
);

ILboolean ilDisable( ILenum Mode );


Parameters

Mode
Mode to enable/disable.

Remarks

ilEnable enables a mode specified by Mode. ilDisable disables a mode specified by Mode. These two functions are identical to their OpenGL counterparts - glEnable and glDisable.

A list of available modes and their meaning:

IL_ORIGIN_SET
When enabled, the origin is specified at an absolute position, and all images loaded or saved adhere to this set origin. For more information, check out ilOriginFunc.

IL_FILE_OVERWRITE
If enabled while saving, OpenIL will overwrite existing files, else IL_FILE_ALREADY_EXISTS is set, and the image is not saved.

IL_CONV_PAL
When enabled, OpenIL automatically converts palette'd images to their base types, e.g. converting to a bgra image.

Error Codes

IL_INVALID_ENUM - Mode was of an unsupported value.

See Also

ilIsEnabled, ilIsDisabled, ilutEnable, ilutDisable, ilOriginFunc