DevIL Documentation Home | Previous | Next

ilEnable, ilDisable

These functions enable or disable an OpenIL state.

ILboolean ilEnable(
  ILenum Mode

ILboolean ilDisable( ILenum Mode );


Mode to enable/disable.


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:

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.

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

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