il.h   il.h 
//------------------------------------------------------------------------- ---- //------------------------------------------------------------------------- ----
// //
// ImageLib Sources // ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods // Copyright (C) 2000-2009 by Denton Woods
// Last modified: 06/23/2002 <--Y2K Compliant! =] // Last modified: 02/05/2009
// //
// Filename: IL/il.h // Filename: IL/il.h
// //
// Description: The main include file for DevIL // Description: The main include file for DevIL
// //
//------------------------------------------------------------------------- ---- //------------------------------------------------------------------------- ----
// Doxygen comment
/*! \file il.h
The main include file for DevIL
*/
#ifndef __il_h_ #ifndef __il_h_
#ifndef __IL_H__ #ifndef __IL_H__
#define __il_h_ #define __il_h_
#define __IL_H__ #define __IL_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
//#define IL_NO_BMP //this define controls if floats and doubles are clampled to [0..1]
//#define IL_NO_CUT //during conversion. It takes a little more time, but it is the correct
//#define IL_NO_CHEAD //way of doing this. If you are sure your floats are always valid,
//#define IL_NO_DCX //you can undefine this value...
//#define IL_NO_DDS #define CLAMP_HALF 1
//#define IL_NO_DOOM #define CLAMP_FLOATS 1
//#define IL_NO_GIF #define CLAMP_DOUBLES 1
//#define IL_NO_ICO
//#define IL_NO_JPG
//#define IL_NO_LIF
//#define IL_NO_MDL
//#define IL_NO_MNG
//#define IL_NO_PCD
//#define IL_NO_PCX
//#define IL_NO_PIC
//#define IL_NO_PIX
//#define IL_NO_PNG
//#define IL_NO_PNM
//#define IL_NO_PSD
//#define IL_NO_PSP
//#define IL_NO_PXR
//#define IL_NO_RAW
//#define IL_NO_SGI
//#define IL_NO_TGA
//#define IL_NO_TIF
//#define IL_NO_WAL
//#define IL_NO_XPM
// Compiling Options
#define IL_INLINE_ASM
//#define IL_DEBUG
//#define IL_STATIC_LIB
//#define IL_NO_LCMS
#ifdef _WIN32
#define IL_USE_JPEGLIB_UNMODIFIED
#endif
#ifdef _WIN32_WCE /*#ifdef _WIN32_WCE
#define IL_NO_EXR
#define IL_NO_GIF #define IL_NO_GIF
#define IL_NO_JP2
#define IL_NO_JPG #define IL_NO_JPG
#define IL_NO_MNG #define IL_NO_MNG
#define IL_NO_PNG #define IL_NO_PNG
#define IL_NO_TIF #define IL_NO_TIF
#define IL_NO_LCMS #define IL_NO_LCMS
#endif//_WIN32_WCE #endif //_WIN32_WCE
#ifdef DJGPP #ifdef DJGPP
#define IL_NO_EXR
#define IL_NO_GIF #define IL_NO_GIF
#define IL_NO_JP2
#define IL_NO_JPG #define IL_NO_JPG
#define IL_NO_MNG #define IL_NO_MNG
#define IL_NO_PNG #define IL_NO_PNG
#define IL_NO_TIF #define IL_NO_TIF
#define IL_NO_LCMS #define IL_NO_LCMS
#endif//DJGPP #endif //DJGPP*/
/*#ifdef __APPLE__
#define IL_NO_GIF
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#endif//__APPLE__*/
#ifdef _WIN32 #ifdef _WIN32
//#define IL_USE_IJL // Whether we use the Intel Jpeg Library (else #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
use libjpeg).
#ifndef IL_STATIC_LIB
#if defined(_MSC_VER) || defined(__BORLANDC__) #if defined(_MSC_VER) || defined(__BORLANDC__)
#ifndef _IL_BUILD_LIBRARY #pragma comment(lib, "DevIL.lib")
#ifdef IL_DEBUG #endif
#pragma comment(lib, "devil-d.lib") #endif
#else #endif
#pragma comment(lib, "devil.lib")
#endif//IL_DEBUG #ifdef RESTRICT_KEYWORD
#endif//_IL_BUILD_LIBRARY #define RESTRICT restrict
#endif//_MSC_VER || __BORLANDC__ #define CONST_RESTRICT const restrict
#endif//IL_STATIC_LIB #else
#endif//_WIN32 #define RESTRICT
#define CONST_RESTRICT const
#endif
#include <stdio.h> #include <stdio.h>
typedef unsigned int ILenum; typedef unsigned int ILenum;
typedef unsigned char ILboolean; typedef unsigned char ILboolean;
typedef unsigned int ILbitfield; typedef unsigned int ILbitfield;
typedef char ILbyte; typedef signed char ILbyte;
typedef short ILshort; typedef signed short ILshort;
typedef int ILint; typedef int ILint;
typedef int ILsizei; typedef size_t ILsizei;
typedef unsigned char ILubyte; typedef unsigned char ILubyte;
typedef unsigned short ILushort; typedef unsigned short ILushort;
typedef unsigned int ILuint; typedef unsigned int ILuint;
typedef float ILfloat; typedef float ILfloat;
typedef float ILclampf; typedef float ILclampf;
typedef double ILdouble; typedef double ILdouble;
typedef double ILclampd; typedef double ILclampd;
typedef void ILvoid;
#ifdef _MSC_VER
typedef __int64 ILint64;
typedef unsigned __int64 ILuint64;
#else
typedef long long int ILint64;
typedef long long unsigned int ILuint64;
#endif
#include <limits.h>
#ifdef _UNICODE #ifdef _UNICODE
#ifndef _WIN32_WCE #ifndef _WIN32_WCE
#include <wchar.h> #include <wchar.h>
#endif #endif
typedef wchar_t* ILstring; //if we use a define instead of a typedef,
//ILconst_string works as intended
#define ILchar wchar_t
#define ILstring wchar_t*
#define ILconst_string wchar_t const *
#else #else
typedef char* ILstring; //if we use a define instead of a typedef,
#endif//_UNICODE //ILconst_string works as intended
#define ILchar char
#define ILstring char*
#define ILconst_string char const *
#endif //_UNICODE
#define IL_FALSE 0 #define IL_FALSE 0
#define IL_TRUE #define IL_TRUE 1
1
// Matches OpenGL's right now. // Matches OpenGL's right now.
#define IL_COLOUR_INDEX 0x19 //! Data formats \link Formats Formats\endlink
00 #define IL_COLOUR_INDEX 0x1900
#define IL_COLOR_INDEX 0x1900 #define IL_COLOR_INDEX 0x1900
#define IL_RGB 0x19 #define IL_ALPHA 0x1906
07 #define IL_RGB 0x1907
#define IL_RGBA #define IL_RGBA 0x1908
0x1908 #define IL_BGR 0x80E0
#define IL_BGR 0x80 #define IL_BGRA 0x80E1
E0 #define IL_LUMINANCE 0x1909
#define IL_BGRA #define IL_LUMINANCE_ALPHA 0x190A
0x80E1
#define IL_LUMINANCE 0x1909
#define IL_LUMINANCE_ALPHA 0x190A
#define IL_BYTE //! Data types \link Types Types\endlink
0x1400 #define IL_BYTE 0x1400
#define IL_UNSIGNED_BYTE 0x1401 #define IL_UNSIGNED_BYTE 0x1401
#define IL_SHORT 0x14 #define IL_SHORT 0x1402
02 #define IL_UNSIGNED_SHORT 0x1403
#define IL_UNSIGNED_SHORT 0x1403 #define IL_INT 0x1404
#define IL_INT 0x14 #define IL_UNSIGNED_INT 0x1405
04 #define IL_FLOAT 0x1406
#define IL_UNSIGNED_INT 0x14 #define IL_DOUBLE 0x140A
05 #define IL_HALF 0x140B
#define IL_FLOAT 0x14
06
#define IL_DOUBLE 0x14
0A
#define IL_VENDOR 0x1F #define IL_MAX_BYTE SCHAR_MAX
00 #define IL_MAX_UNSIGNED_BYTE UCHAR_MAX
#define IL_LOAD_EXT 0x1F #define IL_MAX_SHORT SHRT_MAX
01 #define IL_MAX_UNSIGNED_SHORT USHRT_MAX
#define IL_SAVE_EXT 0x1F #define IL_MAX_INT INT_MAX
02 #define IL_MAX_UNSIGNED_INT UINT_MAX
#define IL_LIMIT(x,m,M) (x<m?m:(x>M?M:x))
#define IL_CLAMP(x) IL_LIMIT(x,0,1)
#define IL_VENDOR 0x1F00
#define IL_LOAD_EXT 0x1F01
#define IL_SAVE_EXT 0x1F02
// //
// IL-specific #define's // IL-specific #define's
// //
#define IL_VERSION_1_6_6 1 #define IL_VERSION_1_7_7 1
#define IL_VERSION 166 #define IL_VERSION 177
// Attribute Bits // Attribute Bits
#define IL_ORIGIN_BIT 0x00000001 #define IL_ORIGIN_BIT 0x00000001
#define IL_FILE_BIT 0x00 #define IL_FILE_BIT 0x00000002
000002 #define IL_PAL_BIT 0x00000004
#define IL_PAL_BIT 0x00 #define IL_FORMAT_BIT 0x00000008
000004 #define IL_TYPE_BIT 0x00000010
#define IL_FORMAT_BIT 0x00000008 #define IL_COMPRESS_BIT 0x00000020
#define IL_TYPE_BIT 0x00 #define IL_LOADFAIL_BIT 0x00000040
000010 #define IL_FORMAT_SPECIFIC_BIT 0x00000080
#define IL_COMPRESS_BIT 0x00 #define IL_ALL_ATTRIB_BITS 0x000FFFFF
000020
#define IL_LOADFAIL_BIT 0x00
000040
#define IL_FORMAT_SPECIFIC_BIT 0x00000080
#define IL_ALL_ATTRIB_BITS 0x000FFFFF
// Palette types // Palette types
#define IL_PAL_NONE 0x04 #define IL_PAL_NONE 0x0400
00 #define IL_PAL_RGB24 0x0401
#define IL_PAL_RGB24 0x0401 #define IL_PAL_RGB32 0x0402
#define IL_PAL_RGB32 0x0402 #define IL_PAL_RGBA32 0x0403
#define IL_PAL_RGBA32 0x0403 #define IL_PAL_BGR24 0x0404
#define IL_PAL_BGR24 0x0404 #define IL_PAL_BGR32 0x0405
#define IL_PAL_BGR32 0x0405 #define IL_PAL_BGRA32 0x0406
#define IL_PAL_BGRA32 0x0406
// Image types // Image types
#define IL_TYPE_UNKNOWN 0x00 #define IL_TYPE_UNKNOWN 0x0000
00 #define IL_BMP 0x0420 //!< Microsoft Windows Bitmap - .bmp extens
#define IL_BMP 0x04 ion
20 #define IL_CUT 0x0421 //!< Dr. Halo - .cut extension
#define IL_CUT 0x04 #define IL_DOOM 0x0422 //!< DooM walls - no specific extension
21 #define IL_DOOM_FLAT 0x0423 //!< DooM flats - no specific extension
#define IL_DOOM #define IL_ICO 0x0424 //!< Microsoft Windows Icons and Cursors -
0x0422 .ico and .cur extensions
#define IL_DOOM_FLAT 0x0423 #define IL_JPG 0x0425 //!< JPEG - .jpg, .jpe and .jpeg extensions
#define IL_ICO 0x04 #define IL_JFIF 0x0425 //!<
24 #define IL_LBM 0x0426 //!< Interlaced bitmap - .lbm extension
#define IL_JPG 0x04 #define IL_PCD 0x0427 //!< Kodak PhotoCD - .pcd extension
25 #define IL_PCX 0x0428 //!< ZSoft PCX - .pcx extension
#define IL_JFIF #define IL_PIC 0x0429 //!< PIC - .pic extension
0x0425 #define IL_PNG 0x042A //!< Portable Network Graphics - .png exten
#define IL_LBM 0x04 sion
26 #define IL_PNM 0x042B //!< Portable Any Map - .pbm, .pgm, .ppm an
#define IL_PCD 0x04 d .pnm extensions
27 #define IL_SGI 0x042C //!< Silicon Graphics - .sgi, .bw, .rgb and
#define IL_PCX 0x04 .rgba extensions
28 #define IL_TGA 0x042D //!< TrueVision Targa File - .tga, .vda, .i
#define IL_PIC 0x04 cb and .vst extensions
29 #define IL_TIF 0x042E //!< Tagged Image File Format - .tif and .t
#define IL_PNG 0x04 iff extensions
2A #define IL_CHEAD 0x042F //!< C-Style Header - .h extension
#define IL_PNM 0x04 #define IL_RAW 0x0430 //!< Raw Image Data - any extension
2B #define IL_MDL 0x0431 //!< Half-Life Model Texture - .mdl extensi
#define IL_SGI 0x04 on
2C #define IL_WAL 0x0432 //!< Quake 2 Texture - .wal extension
#define IL_TGA 0x04 #define IL_LIF 0x0434 //!< Homeworld Texture - .lif extension
2D #define IL_MNG 0x0435 //!< Multiple-image Network Graphics - .mng
#define IL_TIF 0x04 extension
2E #define IL_JNG 0x0435 //!<
#define IL_CHEAD 0x04 #define IL_GIF 0x0436 //!< Graphics Interchange Format - .gif ext
2F ension
#define IL_RAW 0x04 #define IL_DDS 0x0437 //!< DirectDraw Surface - .dds extension
30 #define IL_DCX 0x0438 //!< ZSoft Multi-PCX - .dcx extension
#define IL_MDL 0x04 #define IL_PSD 0x0439 //!< Adobe PhotoShop - .psd extension
31 #define IL_EXIF 0x043A //!<
#define IL_WAL 0x04 #define IL_PSP 0x043B //!< PaintShop Pro - .psp extension
32 #define IL_PIX 0x043C //!< PIX - .pix extension
#define IL_LIF 0x04 #define IL_PXR 0x043D //!< Pixar - .pxr extension
34 #define IL_XPM 0x043E //!< X Pixel Map - .xpm extension
#define IL_MNG 0x04 #define IL_HDR 0x043F //!< Radiance High Dynamic Range - .hdr ext
35 ension
#define IL_JNG 0x04 #define IL_ICNS 0x0440 //!< Macintosh Icon - .icns
35 extension
#define IL_GIF 0x04 #define IL_JP2 0x0441 //!< Jpeg 2000 - .jp2 extension
36 #define IL_EXR 0x0442 //!< OpenEXR - .exr extension
#define IL_DDS 0x04 #define IL_WDP 0x0443 //!<
37 #define IL_VTF 0x0444 //!< Valve Texture Format - .vtf ext
#define IL_DCX 0x04 ension
38 #define IL_WBMP 0x0445 //!< Wireless Bitmap - .wbmp
#define IL_PSD 0x04 extension
39 #define IL_SUN 0x0446 //!< Sun Raster - .sun, .ras, .rs, .
#define IL_EXIF im1, .im8, .im24 and .im32 extensions
0x043A #define IL_IFF 0x0447 //!< Interchange File Format - .iff
#define IL_PSP 0x04 extension
3B #define IL_TPL 0x0448 //!< Gamecube Texture - .tpl extensi
#define IL_PIX 0x04 on
3C
#define IL_PXR 0x04
3D
#define IL_XPM 0x04
3E
#define IL_JASC_PAL 0x04 75 #define IL_JASC_PAL 0x0475 //!< PaintShop Pro Palette
// Error Types // Error Types
#define IL_NO_ERROR 0x00 #define IL_NO_ERROR 0x0000
00 #define IL_INVALID_ENUM 0x0501
#define IL_INVALID_ENUM 0x05 #define IL_OUT_OF_MEMORY 0x0502
01 #define IL_FORMAT_NOT_SUPPORTED 0x0503
#define IL_OUT_OF_MEMORY 0x0502 #define IL_INTERNAL_ERROR 0x0504
#define IL_FORMAT_NOT_SUPPORTED 0x0503 #define IL_INVALID_VALUE 0x0505
#define IL_INTERNAL_ERROR 0x0504 #define IL_ILLEGAL_OPERATION 0x0506
#define IL_INVALID_VALUE 0x0505 #define IL_ILLEGAL_FILE_VALUE 0x0507
#define IL_ILLEGAL_OPERATION 0x0506 #define IL_INVALID_FILE_HEADER 0x0508
#define IL_ILLEGAL_FILE_VALUE 0x0507 #define IL_INVALID_PARAM 0x0509
#define IL_INVALID_FILE_HEADER 0x0508 #define IL_COULD_NOT_OPEN_FILE 0x050A
#define IL_INVALID_PARAM 0x0509 #define IL_INVALID_EXTENSION 0x050B
#define IL_COULD_NOT_OPEN_FILE 0x050A #define IL_FILE_ALREADY_EXISTS 0x050C
#define IL_INVALID_EXTENSION 0x050B #define IL_OUT_FORMAT_SAME 0x050D
#define IL_FILE_ALREADY_EXISTS 0x050C #define IL_STACK_OVERFLOW 0x050E
#define IL_OUT_FORMAT_SAME 0x050D #define IL_STACK_UNDERFLOW 0x050F
#define IL_STACK_OVERFLOW 0x050E #define IL_INVALID_CONVERSION 0x0510
#define IL_STACK_UNDERFLOW 0x050F #define IL_BAD_DIMENSIONS 0x0511
#define IL_INVALID_CONVERSION 0x0510 #define IL_FILE_READ_ERROR 0x0512 // 05/12/2002: Addition by Sam.
#define IL_BAD_DIMENSIONS 0x0511 #define IL_FILE_WRITE_ERROR 0x0512
#define IL_FILE_READ_ERROR 0x0512 // 0
5/12/2002: Addition by Sam.
#define IL_FILE_WRITE_ERROR 0x0512
#define IL_LIB_GIF_ERROR 0x05E1 #define IL_LIB_GIF_ERROR 0x05E1
#define IL_LIB_JPEG_ERROR 0x05E2 #define IL_LIB_JPEG_ERROR 0x05E2
#define IL_LIB_PNG_ERROR 0x05E3 #define IL_LIB_PNG_ERROR 0x05E3
#define IL_LIB_TIFF_ERROR 0x05E4 #define IL_LIB_TIFF_ERROR 0x05E4
#define IL_LIB_MNG_ERROR 0x05E5 #define IL_LIB_MNG_ERROR 0x05E5
#define IL_UNKNOWN_ERROR 0x05FF #define IL_LIB_JP2_ERROR 0x05E6
#define IL_LIB_EXR_ERROR 0x05E7
#define IL_UNKNOWN_ERROR 0x05FF
// Origin Definitions // Origin Definitions
#define IL_ORIGIN_SET 0x0600 #define IL_ORIGIN_SET 0x0600
#define IL_ORIGIN_LOWER_LEFT 0x0601 #define IL_ORIGIN_LOWER_LEFT 0x0601
#define IL_ORIGIN_UPPER_LEFT 0x0602 #define IL_ORIGIN_UPPER_LEFT 0x0602
#define IL_ORIGIN_MODE 0x0603 #define IL_ORIGIN_MODE 0x0603
// Format and Type Mode Definitions // Format and Type Mode Definitions
#define IL_FORMAT_SET 0x0610 #define IL_FORMAT_SET 0x0610
#define IL_FORMAT_MODE 0x0611 #define IL_FORMAT_MODE 0x0611
#define IL_TYPE_SET 0x06 #define IL_TYPE_SET 0x0612
12 #define IL_TYPE_MODE 0x0613
#define IL_TYPE_MODE 0x0613
// File definitions // File definitions
#define IL_FILE_OVERWRITE 0x0620 #define IL_FILE_OVERWRITE 0x0620
#define IL_FILE_MODE 0x0621 #define IL_FILE_MODE 0x0621
// Palette definitions // Palette definitions
#define IL_CONV_PAL 0x06 30 #define IL_CONV_PAL 0x0630
// Load fail definitions // Load fail definitions
#define IL_DEFAULT_ON_FAIL 0x0632 #define IL_DEFAULT_ON_FAIL 0x0632
// Key colour definitions // Key colour and alpha definitions
#define IL_USE_KEY_COLOUR 0x0635 #define IL_USE_KEY_COLOUR 0x0635
#define IL_USE_KEY_COLOR 0x0635 #define IL_USE_KEY_COLOR 0x0635
#define IL_BLIT_BLEND 0x0636
// Interlace definitions // Interlace definitions
#define IL_SAVE_INTERLACED 0x0639 #define IL_SAVE_INTERLACED 0x0639
#define IL_INTERLACE_MODE 0x063A #define IL_INTERLACE_MODE 0x063A
// Quantization definitions // Quantization definitions
#define IL_QUANTIZATION_MODE 0x0640 #define IL_QUANTIZATION_MODE 0x0640
#define IL_WU_QUANT 0x06 #define IL_WU_QUANT 0x0641
41 #define IL_NEU_QUANT 0x0642
#define IL_NEU_QUANT 0x0642 #define IL_NEU_QUANT_SAMPLE 0x0643
#define IL_NEU_QUANT_SAMPLE 0x0643 #define IL_MAX_QUANT_INDEXS 0x0644 //XIX : ILint : Maximum number of color
s to reduce to, default of 256. and has a range of 2-256
#define IL_MAX_QUANT_INDICES 0x0644 // Redefined, since the above #define i
s misspelled
// Hints // Hints
#define IL_FASTEST 0x06 #define IL_FASTEST 0x0660
60 #define IL_LESS_MEM 0x0661
#define IL_LESS_MEM 0x06 #define IL_DONT_CARE 0x0662
61 #define IL_MEM_SPEED_HINT 0x0665
#define IL_DONT_CARE 0x0662 #define IL_USE_COMPRESSION 0x0666
#define IL_MEM_SPEED_HINT 0x0665 #define IL_NO_COMPRESSION 0x0667
#define IL_USE_COMPRESSION 0x0666 #define IL_COMPRESSION_HINT 0x0668
#define IL_NO_COMPRESSION 0x0667
#define IL_COMPRESSION_HINT 0x0668 // Compression
#define IL_NVIDIA_COMPRESS 0x0670
#define IL_SQUISH_COMPRESS 0x0671
// Subimage types // Subimage types
#define IL_SUB_NEXT 0x06 #define IL_SUB_NEXT 0x0680
80 #define IL_SUB_MIPMAP 0x0681
#define IL_SUB_MIPMAP 0x0681 #define IL_SUB_LAYER 0x0682
#define IL_SUB_LAYER 0x0682
// Compression definitions // Compression definitions
#define IL_COMPRESS_MODE 0x0700 #define IL_COMPRESS_MODE 0x0700
#define IL_COMPRESS_NONE 0x0701 #define IL_COMPRESS_NONE 0x0701
#define IL_COMPRESS_RLE 0x07 #define IL_COMPRESS_RLE 0x0702
02 #define IL_COMPRESS_LZO 0x0703
#define IL_COMPRESS_LZO 0x07 #define IL_COMPRESS_ZLIB 0x0704
03
#define IL_COMPRESS_ZLIB 0x0704
// File format-specific values // File format-specific values
#define IL_TGA_CREATE_STAMP 0x0710 #define IL_TGA_CREATE_STAMP 0x0710
#define IL_JPG_QUALITY 0x0711 #define IL_JPG_QUALITY 0x0711
#define IL_PNG_INTERLACE 0x0712 #define IL_PNG_INTERLACE 0x0712
#define IL_TGA_RLE 0x07 #define IL_TGA_RLE 0x0713
13 #define IL_BMP_RLE 0x0714
#define IL_BMP_RLE 0x07 #define IL_SGI_RLE 0x0715
14 #define IL_TGA_ID_STRING 0x0717
#define IL_SGI_RLE 0x07 #define IL_TGA_AUTHNAME_STRING 0x0718
15 #define IL_TGA_AUTHCOMMENT_STRING 0x0719
#define IL_TGA_ID_STRING 0x0717 #define IL_PNG_AUTHNAME_STRING 0x071A
#define IL_TGA_AUTHNAME_STRING 0x0718 #define IL_PNG_TITLE_STRING 0x071B
#define IL_TGA_AUTHCOMMENT_STRING 0x0719 #define IL_PNG_DESCRIPTION_STRING 0x071C
#define IL_PNG_AUTHNAME_STRING 0x071A #define IL_TIF_DESCRIPTION_STRING 0x071D
#define IL_PNG_TITLE_STRING 0x071B #define IL_TIF_HOSTCOMPUTER_STRING 0x071E
#define IL_PNG_DESCRIPTION_STRING 0x071C #define IL_TIF_DOCUMENTNAME_STRING 0x071F
#define IL_TIF_DESCRIPTION_STRING 0x071D #define IL_TIF_AUTHNAME_STRING 0x0720
#define IL_TIF_HOSTCOMPUTER_STRING 0x071E #define IL_JPG_SAVE_FORMAT 0x0721
#define IL_TIF_DOCUMENTNAME_STRING 0x071F #define IL_CHEAD_HEADER_STRING 0x0722
#define IL_TIF_AUTHNAME_STRING 0x0720 #define IL_PCD_PICNUM 0x0723
#define IL_JPG_SAVE_FORMAT 0x0721 #define IL_JPG_PROGRESSIVE 0x0725
#define IL_CHEAD_HEADER_STRING 0x0722
#define IL_PCD_PICNUM 0x0723 #define IL_PNG_ALPHA_INDEX 0x0724 //XIX : ILint : the color in the palette
at this index value (0-255) is considered transparent, -1 for no trasparent
color
// DXTC definitions // DXTC definitions
#define IL_DXTC_FORMAT 0x0705 #define IL_DXTC_FORMAT 0x0705
#define IL_DXT1 #define IL_DXT1 0x0706
0x0706 #define IL_DXT2 0x0707
#define IL_DXT2 #define IL_DXT3 0x0708
0x0707 #define IL_DXT4 0x0709
#define IL_DXT3 #define IL_DXT5 0x070A
0x0708 #define IL_DXT_NO_COMP 0x070B
#define IL_DXT4 #define IL_KEEP_DXTC_DATA 0x070C
0x0709 #define IL_DXTC_DATA_FORMAT 0x070D
#define IL_DXT5 #define IL_3DC 0x070E
0x070A #define IL_RXGB 0x070F
#define IL_DXT_NO_COMP 0x070B #define IL_ATI1N 0x0710
#define IL_KEEP_DXTC_DATA 0x070C #define IL_DXT1A 0x0711 // Normally the same as IL_DXT1, except
#define IL_DXTC_DATA_FORMAT 0x070D for nVidia Texture Tools.
// Cube map definitions // Environment map definitions
#define IL_CUBEMAP_POSITIVEX 0x00000400 #define IL_CUBEMAP_POSITIVEX 0x00000400
#define IL_CUBEMAP_NEGATIVEX 0x00000800 #define IL_CUBEMAP_NEGATIVEX 0x00000800
#define IL_CUBEMAP_POSITIVEY 0x00001000 #define IL_CUBEMAP_POSITIVEY 0x00001000
#define IL_CUBEMAP_NEGATIVEY 0x00002000 #define IL_CUBEMAP_NEGATIVEY 0x00002000
#define IL_CUBEMAP_POSITIVEZ 0x00004000 #define IL_CUBEMAP_POSITIVEZ 0x00004000
#define IL_CUBEMAP_NEGATIVEZ 0x00008000 #define IL_CUBEMAP_NEGATIVEZ 0x00008000
#define IL_SPHEREMAP 0x00010000
// Values // Values
#define IL_VERSION_NUM 0x0DE2 #define IL_VERSION_NUM 0x0DE2
#define IL_IMAGE_WIDTH 0x0DE4 #define IL_IMAGE_WIDTH 0x0DE4
#define IL_IMAGE_HEIGHT 0x0D #define IL_IMAGE_HEIGHT 0x0DE5
E5 #define IL_IMAGE_DEPTH 0x0DE6
#define IL_IMAGE_DEPTH 0x0DE6 #define IL_IMAGE_SIZE_OF_DATA 0x0DE7
#define IL_IMAGE_SIZE_OF_DATA 0x0DE7 #define IL_IMAGE_BPP 0x0DE8
#define IL_IMAGE_BPP 0x0DE8 #define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8
#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8 #define IL_IMAGE_BPP 0x0DE8
#define IL_IMAGE_BITS_PER_PIXEL 0x0DE9 #define IL_IMAGE_BITS_PER_PIXEL 0x0DE9
#define IL_IMAGE_FORMAT 0x0D #define IL_IMAGE_FORMAT 0x0DEA
EA #define IL_IMAGE_TYPE 0x0DEB
#define IL_IMAGE_TYPE 0x0DEB #define IL_PALETTE_TYPE 0x0DEC
#define IL_PALETTE_TYPE 0x0D #define IL_PALETTE_SIZE 0x0DED
EC #define IL_PALETTE_BPP 0x0DEE
#define IL_PALETTE_SIZE 0x0D #define IL_PALETTE_NUM_COLS 0x0DEF
ED #define IL_PALETTE_BASE_TYPE 0x0DF0
#define IL_PALETTE_BPP 0x0DEE #define IL_NUM_FACES 0x0DE1
#define IL_PALETTE_NUM_COLS 0x0DEF #define IL_NUM_IMAGES 0x0DF1
#define IL_PALETTE_BASE_TYPE 0x0DF0 #define IL_NUM_MIPMAPS 0x0DF2
#define IL_NUM_IMAGES 0x0DF1 #define IL_NUM_LAYERS 0x0DF3
#define IL_NUM_MIPMAPS 0x0DF2 #define IL_ACTIVE_IMAGE 0x0DF4
#define IL_NUM_LAYERS 0x0DF3 #define IL_ACTIVE_MIPMAP 0x0DF5
#define IL_ACTIVE_IMAGE 0x0D #define IL_ACTIVE_LAYER 0x0DF6
F4 #define IL_ACTIVE_FACE 0x0E00
#define IL_ACTIVE_MIPMAP 0x0DF5 #define IL_CUR_IMAGE 0x0DF7
#define IL_ACTIVE_LAYER 0x0D #define IL_IMAGE_DURATION 0x0DF8
F6 #define IL_IMAGE_PLANESIZE 0x0DF9
#define IL_CUR_IMAGE 0x0DF7 #define IL_IMAGE_BPC 0x0DFA
#define IL_IMAGE_DURATION 0x0DF8 #define IL_IMAGE_OFFX 0x0DFB
#define IL_IMAGE_PLANESIZE 0x0DF9 #define IL_IMAGE_OFFY 0x0DFC
#define IL_IMAGE_BPC 0x0DFA #define IL_IMAGE_CUBEFLAGS 0x0DFD
#define IL_IMAGE_OFFX 0x0DFB #define IL_IMAGE_ORIGIN 0x0DFE
#define IL_IMAGE_OFFY 0x0DFC #define IL_IMAGE_CHANNELS 0x0DFF
#define IL_IMAGE_CUBEFLAGS 0x0DFD
#define IL_IMAGE_ORIGIN 0x0DFE # if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__
> 0))
// __attribute__((deprecated)) is supported by GCC 3.1 and later.
# define DEPRECATED(D) D __attribute__((deprecated))
# elif defined _MSC_VER && _MSC_VER >= 1300
// __declspec(deprecated) is supported by MSVC 7.0 and later.
# define DEPRECATED(D) __declspec(deprecated) D
# else
# define DEPRECATED (D) D
# endif
// //
// Section shamelessly modified from the glut header. // Section shamelessly modified from the glut header.
// //
// This is from Win32's <windef.h> // This is from Win32's <windef.h>
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC_ _) || defined(__LCC__) #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC_ _) || defined(__LCC__)
#define ILAPIENTRY __stdcall #define ILAPIENTRY __stdcall
#define IL_PACKSTRUCT #define IL_PACKSTRUCT
#elif defined(linux) || defined(MACOSX) //#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug
#define ILAPIENTRY 840364
#elif defined( __GNUC__ )
// this should work for any of the above commented platforms
// plus any platform using GCC
#ifdef __MINGW32__
#define ILAPIENTRY __stdcall
#else
#define ILAPIENTRY
#endif
#define IL_PACKSTRUCT __attribute__ ((packed)) #define IL_PACKSTRUCT __attribute__ ((packed))
#else #else
#define ILAPIENTRY #define ILAPIENTRY
#define IL_PACKSTRUCT #define IL_PACKSTRUCT
#endif #endif
// This is from Win32's <wingdi.h> and <winnt.h> // This is from Win32's <wingdi.h> and <winnt.h>
#if defined(__LCC__) #if defined(__LCC__)
#define ILAPI __stdcall #define ILAPI __stdcall
#elif _WIN32 #elif defined(_WIN32) //changed 20031221 to fix bug 840421
#ifdef IL_STATIC_LIB #ifdef IL_STATIC_LIB
#define ILAPI #define ILAPI
#else #else
#ifdef _IL_BUILD_LIBRARY #ifdef _IL_BUILD_LIBRARY
#define ILAPI __declspec(dllexport) #define ILAPI __declspec(dllexport)
#else #else
#define ILAPI __declspec(dllimport) #define ILAPI __declspec(dllimport)
#endif #endif
#endif #endif
#elif __APPLE__ #elif __APPLE__
skipping to change at line 418 skipping to change at line 468
#define ILAPI #define ILAPI
#endif #endif
#define IL_SEEK_SET 0 #define IL_SEEK_SET 0
#define IL_SEEK_CUR 1 #define IL_SEEK_CUR 1
#define IL_SEEK_END 2 #define IL_SEEK_END 2
#define IL_EOF -1 #define IL_EOF -1
// Callback functions for file reading // Callback functions for file reading
typedef void* ILHANDLE; typedef void* ILHANDLE;
typedef ILvoid (ILAPIENTRY *fCloseRProc)(ILHANDLE); typedef void (ILAPIENTRY *fCloseRProc)(ILHANDLE);
typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE); typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE); typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (const ILstring); typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (ILconst_string);
typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILH typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE
ANDLE); );
typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint); typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE); typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE);
// Callback functions for file writing // Callback functions for file writing
typedef ILvoid (ILAPIENTRY *fCloseWProc)(ILHANDLE); typedef void (ILAPIENTRY *fCloseWProc)(ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (const ILstring); typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string);
typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE); typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE);
typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint); typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE); typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuin typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILH
t, ILHANDLE); ANDLE);
// Callback functions for allocation and deallocation // Callback functions for allocation and deallocation
typedef ILvoid* (ILAPIENTRY *mAlloc)(ILuint); typedef void* (ILAPIENTRY *mAlloc)(const ILsizei);
typedef ILvoid (ILAPIENTRY *mFree) (ILvoid*); typedef void (ILAPIENTRY *mFree) (const void* CONST_RESTRICT);
// Registered format procedures // Registered format procedures
typedef ILenum (ILAPIENTRY *IL_LOADPROC)(const ILstring); typedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string);
typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(const ILstring); typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string);
// ImageLib Functions // ImageLib Functions
ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number); ILAPI ILboolean ILAPIENTRY ilActiveFace(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number); ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number); ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilApplyPal(const ILstring FileNam ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number);
e); ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilApplyProfile(const ILstring InP ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutP
rofile, const ILstring OutProfile); rofile);
ILAPI ILvoid ILAPIENTRY ilBindImage(ILuint Image); ILAPI void ILAPIENTRY ilBindImage(ILuint Image);
ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY,
, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint W ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint He
idth, ILuint Height, ILuint Depth); ight, ILuint Depth);
ILAPI ILvoid ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Gree ILAPI ILboolean ILAPIENTRY ilClampNTSC(void);
n, ILclampf Blue, ILclampf Alpha); ILAPI void ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Gree
ILAPI ILboolean ILAPIENTRY ilClearImage(ILvoid); n, ILclampf Blue, ILclampf Alpha);
ILAPI ILuint ILAPIENTRY ilCloneCurImage(ILvoid); ILAPI ILboolean ILAPIENTRY ilClearImage(void);
ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode); ILAPI ILuint ILAPIENTRY ilCloneCurImage(void);
ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILAPI ILubyte* ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint
ILenum DestType); Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize);
ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat); ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src); ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestTyp
ILAPI ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, IL e);
uint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat);
Type, ILvoid *Data); ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src);
ILAPI ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num) ILAPI ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZO
; ff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type,
ILAPI ILboolean ILAPIENTRY ilDefaultImage(ILvoid); void *Data);
ILAPI ILvoid ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint ILAPI ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num);
*Images); ILAPI ILboolean ILAPIENTRY ilDefaultImage(void);
ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode); ILAPI void ILAPIENTRY ilDeleteImage(const ILuint Num);
ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode); ILAPI void ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images
ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode); );
ILAPI ILvoid ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images); ILAPI ILenum ILAPIENTRY ilDetermineType(ILconst_string FileName);
ILAPI ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type); ILAPI ILenum ILAPIENTRY ilDetermineTypeF(ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode); ILAPI ILenum ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size);
ILAPI ILvoid ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Par ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode);
am); ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage(void);
ILAPI ILubyte* ILAPIENTRY ilGetData(ILvoid); ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface(void);
ILAPI ILuint ILAPIENTRY ilGetDXTCData(ILvoid *Buffer, ILuint Buff ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode);
erSize, ILenum DXTCFormat); ILAPI void ILAPIENTRY ilFlipSurfaceDxtcData(void);
ILAPI ILenum ILAPIENTRY ilGetError(ILvoid); ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode);
ILAPI ILint ILAPIENTRY ilGetInteger(ILenum Mode); ILAPI void ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images);
ILAPI ILvoid ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param); ILAPI ILuint ILAPIENTRY ilGenImage(void);
ILAPI ILuint ILAPIENTRY ilGetLumpPos(ILvoid); ILAPI ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type);
ILAPI ILubyte* ILAPIENTRY ilGetPalette(ILvoid); ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode);
ILAPI const ILstring ILAPIENTRY ilGetString(ILenum StringName); ILAPI void ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param);
ILAPI ILvoid ILAPIENTRY ilHint(ILenum Target, ILenum Mode); ILAPI ILubyte* ILAPIENTRY ilGetData(void);
ILAPI ILvoid ILAPIENTRY ilInit(ILvoid); ILAPI ILuint ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, I
ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode); Lenum DXTCFormat);
ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode); ILAPI ILenum ILAPIENTRY ilGetError(void);
ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image); ILAPI ILint ILAPIENTRY ilGetInteger(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, const ILst ILAPI void ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param);
ring FileName); ILAPI ILuint ILAPIENTRY ilGetLumpPos(void);
ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE ILAPI ILubyte* ILAPIENTRY ilGetPalette(void);
File); ILAPI ILconst_string ILAPIENTRY ilGetString(ILenum StringName);
ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, ILvoid *L ILAPI void ILAPIENTRY ilHint(ILenum Target, ILenum Mode);
ump, ILuint Size); ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha(void);
ILAPI ILvoid ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILAPI void ILAPIENTRY ilInit(void);
ILclampf Blue, ILclampf Alpha); ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format);
ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, const ILstrin ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode);
g FileName); ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE Fil ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image);
e); ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilLoadImage(const ILstring FileNa ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File);
me); ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size)
ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, ILvoid *Lump ;
, ILuint Size); ILAPI void ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclam
ILAPI ILboolean ILAPIENTRY ilLoadPal(const ILstring FileName pf Blue, ILclampf Alpha);
); ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode); ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILi ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName);
nt XCoord, ILint YCoord, ILint ZCoord); ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Si
ILAPI ILvoid ILAPIENTRY ilPopAttrib(ILvoid); ze);
ILAPI ILvoid ILAPIENTRY ilPushAttrib(ILuint Bits); ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName);
ILAPI ILvoid ILAPIENTRY ilRegisterFormat(ILenum Format); ILAPI void ILAPIENTRY ilModAlpha(ILdouble AlphaValue);
ILAPI ILboolean ILAPIENTRY ilRegisterLoad(const ILstring Ext ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode);
, IL_LOADPROC Load); ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILin
ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num); t YCoord, ILint ZCoord);
ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num); ILAPI void ILAPIENTRY ilPopAttrib(void);
ILAPI ILvoid ILAPIENTRY ilRegisterOrigin(ILenum Origin); ILAPI void ILAPIENTRY ilPushAttrib(ILuint Bits);
ILAPI ILvoid ILAPIENTRY ilRegisterPal(ILvoid *Pal, ILuint Size, I ILAPI void ILAPIENTRY ilRegisterFormat(ILenum Format);
Lenum Type); ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC L
ILAPI ILboolean ILAPIENTRY ilRegisterSave(const ILstring Ext oad);
, IL_SAVEPROC Save); ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num);
ILAPI ILvoid ILAPIENTRY ilRegisterType(ILenum Type); ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num);
ILAPI ILboolean ILAPIENTRY ilRemoveLoad(const ILstring Ext); ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num);
ILAPI ILboolean ILAPIENTRY ilRemoveSave(const ILstring Ext); ILAPI void ILAPIENTRY ilRegisterOrigin(ILenum Origin);
ILAPI ILvoid ILAPIENTRY ilResetMemory(ILvoid); ILAPI void ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Typ
ILAPI ILvoid ILAPIENTRY ilResetRead(ILvoid); e);
ILAPI ILvoid ILAPIENTRY ilResetWrite(ILvoid); ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC S
ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, const ILstrin ave);
g FileName); ILAPI void ILAPIENTRY ilRegisterType(ILenum Type);
ILAPI ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File); ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext);
ILAPI ILboolean ILAPIENTRY ilSaveImage(const ILstring FileNa ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext);
me); ILAPI void ILAPIENTRY ilResetMemory(void); // Deprecated
ILAPI ILuint ILAPIENTRY ilSaveL(ILenum Type, ILvoid *Lump, ILuint ILAPI void ILAPIENTRY ilResetRead(void);
Size); ILAPI void ILAPIENTRY ilResetWrite(void);
ILAPI ILboolean ILAPIENTRY ilSavePal(const ILstring FileName ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName);
); ILAPI ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilSetData(ILvoid *Data); ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration); ILAPI ILuint ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size);
ILAPI ILvoid ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param); ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName);
ILAPI ILvoid ILAPIENTRY ilSetMemory(mAlloc, mFree); ILAPI ILboolean ILAPIENTRY ilSetAlpha( ILdouble AlphaValue );
ILAPI ILvoid ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ILAPI ILboolean ILAPIENTRY ilSetData(void *Data);
ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Typ ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration);
e, ILvoid *Data); ILAPI void ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param);
ILAPI ILvoid ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofPr ILAPI void ILAPIENTRY ilSetMemory(mAlloc, mFree);
oc, fGetcProc, fReadProc, fSeekRProc, fTellRProc); ILAPI void ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff,
ILAPI ILvoid ILAPIENTRY ilSetString(ILenum Mode, const char *Stri ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void
ng); *Data);
ILAPI ILvoid ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutc ILAPI void ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGe
Proc, fSeekWProc, fTellWProc, fWriteProc); tcProc, fReadProc, fSeekRProc, fTellRProc);
ILAPI ILvoid ILAPIENTRY ilShutDown(ILvoid); ILAPI void ILAPIENTRY ilSetString(ILenum Mode, const char *String);
ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint H ILAPI void ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, f
eight, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data) SeekWProc, fTellWProc, fWriteProc);
; ILAPI void ILAPIENTRY ilShutDown(void);
ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode); ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format);
ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint D
ILAPI ILboolean ILAPIENTRY ilLoadData(const ILstring FileNam epth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data);
e, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum
ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint DxtFormat, const ILubyte* data);
Width, ILuint Height, ILuint Depth, ILubyte Bpp); ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilLoadDataL(ILvoid *Lump, ILuint ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode);
Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width
ILAPI ILboolean ILAPIENTRY ilSaveData(const ILstring FileNam , ILuint Height, ILuint Depth, ILubyte Bpp);
e); ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint
Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilLoadFromJpegStruct(ILvoid* Jpeg ILAPI ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Widt
DecompressorPtr); h, ILuint Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilSaveFromJpegStruct(ILvoid* Jpeg ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName);
CompressorPtr);
// For all those weirdos that spell "colour" without the 'u'. // For all those weirdos that spell "colour" without the 'u'.
#define ilClearColor ilClearColour #define ilClearColor ilClearColour
#define ilKeyColor ilKeyColour #define ilKeyColor ilKeyColour
#ifdef ALTIVEC
#define imemclear(x,y) vec_memclear(x,y);
#else
#define imemclear(x,y) memset(x,0,y);
#endif
#ifdef ALTIVEC #define imemclear(x,y) memset(x,0,y);
void vec_memclear( ILvoid *, ILuint );
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // __IL_H__ #endif // __IL_H__
#endif // __il_h__ #endif // __il_h__
 End of changes. 50 change blocks. 
520 lines changed or deleted 507 lines changed or added


 ilu.h   ilu.h 
//------------------------------------------------------------------------- ---- //------------------------------------------------------------------------- ----
// //
// ImageLib Utility Sources // ImageLib Utility Sources
// Copyright (C) 2000-2002 by Denton Woods // Copyright (C) 2000-2009 by Denton Woods
// Last modified: 06/23/2002 <--Y2K Compliant! =] // Last modified: 02/05/2009
// //
// Filename: IL/ilu.h // Filename: IL/ilu.h
// //
// Description: The main include file for ILU // Description: The main include file for ILU
// //
//------------------------------------------------------------------------- ---- //------------------------------------------------------------------------- ----
// Doxygen comment
/*! \file ilu.h
The main include file for ILU
*/
#ifndef __ilu_h_ #ifndef __ilu_h_
#ifndef __ILU_H__ #ifndef __ILU_H__
#define __ilu_h_ #define __ilu_h_
#define __ILU_H__ #define __ILU_H__
#include <IL/il.h> #include <IL/il.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#ifndef IL_STATIC_LIB #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__) #if defined(_MSC_VER) || defined(__BORLANDC__)
#ifndef _ILU_BUILD_LIBRARY #pragma comment(lib, "ILU.lib")
#ifdef IL_DEBUG #endif
#pragma comment(lib, "ilu-d.lib") #endif
#else #endif
#pragma comment(lib, "ilu.lib")
#endif//_DEBUG
#endif//_ILU_BUILD_LIBRARY
#endif//_MSC_VER || __BORLANDC__
#endif//IL_STATIC_LIB
#endif//_WIN32
#define ILU_VERSION_1_6_6 1 #define ILU_VERSION_1_7_7 1
#define ILU_VERSION 166 #define ILU_VERSION 177
#define ILU_FILTER 0x26 #define ILU_FILTER 0x2600
00 #define ILU_NEAREST 0x2601
#define ILU_NEAREST 0x26 #define ILU_LINEAR 0x2602
01 #define ILU_BILINEAR 0x2603
#define ILU_LINEAR 0x26 #define ILU_SCALE_BOX 0x2604
02 #define ILU_SCALE_TRIANGLE 0x2605
#define ILU_BILINEAR 0x2603 #define ILU_SCALE_BELL 0x2606
#define ILU_SCALE_BOX 0x2604 #define ILU_SCALE_BSPLINE 0x2607
#define ILU_SCALE_TRIANGLE 0x2605 #define ILU_SCALE_LANCZOS3 0x2608
#define ILU_SCALE_BELL 0x2606 #define ILU_SCALE_MITCHELL 0x2609
#define ILU_SCALE_BSPLINE 0x2607
#define ILU_SCALE_LANCZOS3 0x2608
#define ILU_SCALE_MITCHELL 0x2609
// Error types // Error types
#define ILU_INVALID_ENUM 0x0501 #define ILU_INVALID_ENUM 0x0501
#define ILU_OUT_OF_MEMORY 0x0502 #define ILU_OUT_OF_MEMORY 0x0502
#define ILU_INTERNAL_ERROR 0x0504 #define ILU_INTERNAL_ERROR 0x0504
#define ILU_INVALID_VALUE 0x0505 #define ILU_INVALID_VALUE 0x0505
#define ILU_ILLEGAL_OPERATION 0x0506 #define ILU_ILLEGAL_OPERATION 0x0506
#define ILU_INVALID_PARAM 0x0509 #define ILU_INVALID_PARAM 0x0509
// Values // Values
#define ILU_PLACEMENT 0x0700 #define ILU_PLACEMENT 0x0700
#define ILU_LOWER_LEFT 0x0701 #define ILU_LOWER_LEFT 0x0701
#define ILU_LOWER_RIGHT 0x07 #define ILU_LOWER_RIGHT 0x0702
02 #define ILU_UPPER_LEFT 0x0703
#define ILU_UPPER_LEFT 0x0703 #define ILU_UPPER_RIGHT 0x0704
#define ILU_UPPER_RIGHT 0x07 #define ILU_CENTER 0x0705
04 #define ILU_CONVOLUTION_MATRIX 0x0710
#define ILU_CENTER 0x07
05 #define ILU_VERSION_NUM IL_VERSION_NUM
#define ILU_CONVOLUTION_MATRIX 0x0710 #define ILU_VENDOR IL_VENDOR
#define ILU_VERSION_NUM IL_V
ERSION_NUM // Languages
#define ILU_VENDOR IL_V #define ILU_ENGLISH 0x0800
ENDOR #define ILU_ARABIC 0x0801
#define ILU_DUTCH 0x0802
#define ILU_JAPANESE 0x0803
#define ILU_SPANISH 0x0804
#define ILU_GERMAN 0x0805
// Filters // Filters
/* /*
#define ILU_FILTER_BLUR 0x08 #define ILU_FILTER_BLUR 0x0803
03 #define ILU_FILTER_GAUSSIAN_3x3 0x0804
#define ILU_FILTER_GAUSSIAN_3x3 0x0804 #define ILU_FILTER_GAUSSIAN_5X5 0x0805
#define ILU_FILTER_GAUSSIAN_5X5 0x0805 #define ILU_FILTER_EMBOSS1 0x0807
#define ILU_FILTER_EMBOSS1 0x0807 #define ILU_FILTER_EMBOSS2 0x0808
#define ILU_FILTER_EMBOSS2 0x0808 #define ILU_FILTER_LAPLACIAN1 0x080A
#define ILU_FILTER_LAPLACIAN1 0x080A #define ILU_FILTER_LAPLACIAN2 0x080B
#define ILU_FILTER_LAPLACIAN2 0x080B #define ILU_FILTER_LAPLACIAN3 0x080C
#define ILU_FILTER_LAPLACIAN3 0x080C #define ILU_FILTER_LAPLACIAN4 0x080D
#define ILU_FILTER_LAPLACIAN4 0x080D #define ILU_FILTER_SHARPEN1 0x080E
#define ILU_FILTER_SHARPEN1 0x080E #define ILU_FILTER_SHARPEN2 0x080F
#define ILU_FILTER_SHARPEN2 0x080F #define ILU_FILTER_SHARPEN3 0x0810
#define ILU_FILTER_SHARPEN3 0x0810
*/ */
typedef struct ILinfo typedef struct ILinfo
{ {
ILuint Id; // the image's id ILuint Id; // the image's id
ILubyte *Data; // the image's data ILubyte *Data; // the image's data
ILuint Width; // the image's width ILuint Width; // the image's width
ILuint Height; // the image's height ILuint Height; // the image's height
ILuint Depth; // the image's depth ILuint Depth; // the image's depth
ILubyte Bpp; // bytes per pixel (not bits ILubyte Bpp; // bytes per pixel (not bits) of the image
) of the image ILuint SizeOfData; // the total size of the data (in bytes)
ILuint SizeOfData; // the total size of the dat ILenum Format; // image format (in IL enum style)
a (in bytes) ILenum Type; // image type (in IL enum style)
ILenum Format; // image format (in IL enum ILenum Origin; // origin of the image
style) ILubyte *Palette; // the image's palette
ILenum Type; // image type (in IL enum st ILenum PalType; // palette type
yle) ILuint PalSize; // palette size
ILenum Origin; // origin of the image ILenum CubeFlags; // flags for what cube map sides are present
ILubyte *Palette; // the image's palette ILuint NumNext; // number of images following
ILenum PalType; // palette type ILuint NumMips; // number of mipmaps
ILuint PalSize; // palette size ILuint NumLayers; // number of layers
ILenum CubeFlags; // flags for what cube map s
ides are present
ILuint NumNext; // number of images followin
g
ILuint NumMips; // number of mipmaps
ILuint NumLayers; // number of layers
} ILinfo; } ILinfo;
typedef struct ILpointf typedef struct ILpointf {
{ ILfloat x;
ILfloat x, y; ILfloat y;
} ILpointf; } ILpointf;
typedef struct ILpointi typedef struct ILpointi {
{ ILint x;
ILint x, y; ILint y;
} ILpointi; } ILpointi;
// ImageLib Utility Functions ILAPI ILboolean ILAPIENTRY iluAlienify(void);
ILAPI ILboolean ILAPIENTRY iluAlienify(ILvoid); ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter); ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint It ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(void);
er); ILAPI ILuint ILAPIENTRY iluColoursUsed(void);
ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(ILvoid); ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Comp);
ILAPI ILuint ILAPIENTRY iluColoursUsed(ILvoid); ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contrast);
ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Co ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZO
mp); ff, ILuint Width, ILuint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contr ILAPI void ILAPIENTRY iluDeleteImage(ILuint Id); // Deprecated
ast); ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(void);
ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILui ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(void);
nt YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth); ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(void);
ILAPI ILvoid ILAPIENTRY iluDeleteImage(ILuint Id); ILAPI ILboolean ILAPIENTRY iluEmboss(void);
ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(ILvoid); ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Heigh
ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(ILvoid); t, ILuint Depth);
ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(ILvoid); ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim,
ILAPI ILboolean ILAPIENTRY iluEmboss(ILvoid); ILfloat ZDim);
ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint W ILAPI ILboolean ILAPIENTRY iluEqualize(void);
idth, ILuint Height, ILuint Depth); ILAPI ILconst_string ILAPIENTRY iluErrorString(ILenum Error);
ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat X ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale,
Dim, ILfloat YDim, ILfloat ZDim); ILint bias);
ILAPI ILboolean ILAPIENTRY iluEqualize(ILvoid); ILAPI ILboolean ILAPIENTRY iluFlipImage(void);
ILAPI const ILstring ILAPIENTRY iluErrorString(ILenum Error); ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma);
ILAPI ILboolean ILAPIENTRY iluFlipImage(ILvoid); ILAPI ILuint ILAPIENTRY iluGenImage(void); // Deprecated
ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat G ILAPI void ILAPIENTRY iluGetImageInfo(ILinfo *Info);
amma); ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode);
ILAPI ILuint ILAPIENTRY iluGenImage(ILvoid); ILAPI void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILvoid ILAPIENTRY iluGetImageInfo(ILinfo *Info); ILAPI ILstring ILAPIENTRY iluGetString(ILenum StringName);
ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode ILAPI void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Para
); m);
ILAPI ILvoid ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint ILAPI void ILAPIENTRY iluInit(void);
*Param); ILAPI ILboolean ILAPIENTRY iluInvertAlpha(void);
ILAPI const ILstring ILAPIENTRY iluGetString(ILenum StringName); ILAPI ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName);
ILAPI ILvoid ILAPIENTRY iluImageParameter(ILenum PName, I ILAPI ILboolean ILAPIENTRY iluMirror(void);
Lenum Param); ILAPI ILboolean ILAPIENTRY iluNegative(void);
ILAPI ILvoid ILAPIENTRY iluInit(ILvoid); ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance);
ILAPI ILboolean ILAPIENTRY iluInvertAlpha(ILvoid); ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSize);
ILAPI ILuint ILAPIENTRY iluLoadImage(const ILstring FileN ILAPI void ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n);
ame); ILAPI void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n);
ILAPI ILboolean ILAPIENTRY iluMirror(ILvoid); ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green
ILAPI ILboolean ILAPIENTRY iluNegative(ILvoid); , ILubyte Blue, ILfloat Tolerance);
ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Toler ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle);
ance); ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z
ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSiz , ILfloat Angle);
e); ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation);
ILAPI ILvoid ILAPIENTRY iluRegionfv(ILpointf *Points, ILu ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat
int n); b, ILfloat Saturation);
ILAPI ILvoid ILAPIENTRY iluRegioniv(ILpointi *Points, ILu ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuin
int n); t Depth);
ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte ILAPI ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale);
Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance); ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILflo
ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle); at b);
ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, IL ILAPI ILboolean ILAPIENTRY iluSetLanguage(ILenum Language);
float y, ILfloat z, ILfloat Angle); ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Sat ILAPI ILboolean ILAPIENTRY iluSwapColours(void);
uration); ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle);
ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r,
ILfloat g, ILfloat b, ILfloat Saturation);
ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, IL
uint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r
, ILfloat g, ILfloat b);
ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor
, ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluSwapColours(ILvoid);
ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle);
#define iluColorsUsed iluColoursUsed #define iluColorsUsed iluColoursUsed
#define iluSwapColors iluSwapColours #define iluSwapColors iluSwapColours
#define iluReplaceColor iluReplaceColour #define iluReplaceColor iluReplaceColour
#define iluScaleColor iluScaleColour #define iluScaleColor iluScaleColour
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // __ILU_H__ #endif // __ILU_H__
#endif // __ilu_h_ #endif // __ilu_h_
 End of changes. 14 change blocks. 
161 lines changed or deleted 144 lines changed or added


 ilu_region.h   ilu_region.h 
skipping to change at line 16 skipping to change at line 16
// //
// Filename: src-ILU/src/ilu_region.h // Filename: src-ILU/src/ilu_region.h
// //
// Description: Creates an image region. // Description: Creates an image region.
// //
//------------------------------------------------------------------------- ---- //------------------------------------------------------------------------- ----
#ifndef ILU_REGION_H #ifndef ILU_REGION_H
#define ILU_REGION_H #define ILU_REGION_H
#include "ilu_internal.h"
typedef struct Edge typedef struct Edge
{ {
ILint yUpper; ILint yUpper;
ILfloat xIntersect, dxPerScan; ILfloat xIntersect, dxPerScan;
struct Edge *next; struct Edge *next;
} Edge; } Edge;
#endif//ILU_REGION_H #endif//ILU_REGION_H
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 ilut.h   ilut.h 
//------------------------------------------------------------------------- ---- //------------------------------------------------------------------------- ----
// //
// ImageLib Utility Toolkit Sources // ImageLib Utility Toolkit Sources
// Copyright (C) 2000-2002 by Denton Woods // Copyright (C) 2000-2009 by Denton Woods
// Last modified: 06/23/2002 <--Y2K Compliant! =] // Last modified: 02/05/2009
// //
// Filename: IL/ilut.h // Filename: IL/ilut.h
// //
// Description: The main include file for ILUT // Description: The main include file for ILUT
// //
//------------------------------------------------------------------------- ---- //------------------------------------------------------------------------- ----
// Doxygen comment
/*! \file ilut.h
The main include file for ILUT
*/
#ifndef __ilut_h_ #ifndef __ilut_h_
#ifndef __ILUT_H__ #ifndef __ILUT_H__
#define __ilut_h_ #define __ilut_h_
#define __ILUT_H__ #define __ILUT_H__
#include <IL/il.h> #include <IL/il.h>
#include <IL/ilu.h> #include <IL/ilu.h>
#ifdef __cplusplus //-------------------------------------------------------------------------
extern "C" { ----
#endif // Defines
//-------------------------------------------------------------------------
#ifdef _WIN32 ----
#ifndef IL_STATIC_LIB
#if defined(_MSC_VER) || defined(__BORLANDC__)
#ifndef _ILUT_BUILD_LIBRARY
#ifdef IL_DEBUG
#pragma comment(lib, "ilut-d.lib")
#else
#pragma comment(lib, "ilut.lib")
#endif//_DEBUG
#endif//_ILUT_BUILD_LIBRARY
#endif//_MSC_VER || __BORLANDC__
#endif//IL_STATIC_LIB
#endif//_WIN32
#define ILUT_VERSION_1_6_6 1 #define ILUT_VERSION_1_7_7 1
#define ILUT_VERSION 166 #define ILUT_VERSION 177
// Attribute Bits // Attribute Bits
#define ILUT_OPENGL_BIT 0x00 #define ILUT_OPENGL_BIT 0x00000001
000001 #define ILUT_D3D_BIT 0x00000002
#define ILUT_D3D_BIT 0x00000002 #define ILUT_ALL_ATTRIB_BITS 0x000FFFFF
#define ILUT_ALL_ATTRIB_BITS 0x000FFFFF
// Error Types // Error Types
#define ILUT_INVALID_ENUM 0x0501 #define ILUT_INVALID_ENUM 0x0501
#define ILUT_OUT_OF_MEMORY 0x0502 #define ILUT_OUT_OF_MEMORY 0x0502
#define ILUT_INVALID_VALUE 0x0505 #define ILUT_INVALID_VALUE 0x0505
#define ILUT_ILLEGAL_OPERATION 0x0506 #define ILUT_ILLEGAL_OPERATION 0x0506
#define ILUT_INVALID_PARAM 0x0509 #define ILUT_INVALID_PARAM 0x0509
#define ILUT_COULD_NOT_OPEN_FILE 0x050A #define ILUT_COULD_NOT_OPEN_FILE 0x050A
#define ILUT_STACK_OVERFLOW 0x050E #define ILUT_STACK_OVERFLOW 0x050E
#define ILUT_STACK_UNDERFLOW 0x050F #define ILUT_STACK_UNDERFLOW 0x050F
#define ILUT_BAD_DIMENSIONS 0x0511 #define ILUT_BAD_DIMENSIONS 0x0511
#define ILUT_NOT_SUPPORTED 0x0550 #define ILUT_NOT_SUPPORTED 0x0550
// State Definitions // State Definitions
#define ILUT_PALETTE_MODE 0x0600 #define ILUT_PALETTE_MODE 0x0600
#define ILUT_OPENGL_CONV 0x0610 #define ILUT_OPENGL_CONV 0x0610
#define ILUT_D3D_MIPLEVELS 0x0620 #define ILUT_D3D_MIPLEVELS 0x0620
#define ILUT_MAXTEX_WIDTH 0x0630 #define ILUT_MAXTEX_WIDTH 0x0630
#define ILUT_MAXTEX_HEIGHT 0x0631 #define ILUT_MAXTEX_HEIGHT 0x0631
#define ILUT_MAXTEX_DEPTH 0x0632 #define ILUT_MAXTEX_DEPTH 0x0632
#define ILUT_GL_USE_S3TC 0x0634 #define ILUT_GL_USE_S3TC 0x0634
#define ILUT_D3D_USE_DXTC 0x0634 #define ILUT_D3D_USE_DXTC 0x0634
#define ILUT_GL_GEN_S3TC 0x0635 #define ILUT_GL_GEN_S3TC 0x0635
#define ILUT_D3D_GEN_DXTC 0x0635 #define ILUT_D3D_GEN_DXTC 0x0635
#define ILUT_S3TC_FORMAT 0x0705 #define ILUT_S3TC_FORMAT 0x0705
#define ILUT_DXTC_FORMAT 0x0705 #define ILUT_DXTC_FORMAT 0x0705
#define ILUT_D3D_POOL 0x0706 #define ILUT_D3D_POOL 0x0706
#define ILUT_D3D_ALPHA_KEY_COLOR 0x0707
#define ILUT_D3D_ALPHA_KEY_COLOUR 0x0707
#define ILUT_FORCE_INTEGER_FORMAT 0x0636
// Values //This new state does automatic texture target detection
#define ILUT_VERSION_NUM IL_VERSION_N //if enabled. Currently, only cubemap detection is supported.
UM //if the current image is no cubemap, the 2d texture is chosen.
#define ILUT_VENDOR IL_V #define ILUT_GL_AUTODETECT_TEXTURE_TARGET 0x0807
ENDOR
// ImageLib Utility Toolkit Functions // Values
ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode); #define ILUT_VERSION_NUM IL_VERSION_NUM
ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode); #define ILUT_VENDOR IL_VENDOR
ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *P
aram);
ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param
);
ILAPI const ILstring ILAPIENTRY ilutGetString(ILenum StringName);
ILAPI ILvoid ILAPIENTRY ilutInit(ILvoid);
ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode);
ILAPI ILvoid ILAPIENTRY ilutPopAttrib(ILvoid);
ILAPI ILvoid ILAPIENTRY ilutPushAttrib(ILuint Bits);
ILAPI ILvoid ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param);
// The different rendering api's...more to be added later? // The different rendering api's...more to be added later?
#define ILUT_OPENGL 0 #define ILUT_OPENGL 0
#define ILUT_ALLEGRO 1 #define ILUT_ALLEGRO 1
#define ILUT_WIN32 2 #define ILUT_WIN32 2
#define ILUT_DIRECT3D8 3 #define ILUT_DIRECT3D8 3
#define ILUT_DIRECT3D9 4 #define ILUT_DIRECT3D9 4
#define ILUT_X11 5
ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer); #define ILUT_DIRECT3D10 6
/*
// Includes specific config // Includes specific config
#ifdef DJGPP #ifdef DJGPP
#define ILUT_USE_ALLEGRO #define ILUT_USE_ALLEGRO
#elif _WIN32_WCE #elif _WIN32_WCE
#define ILUT_USE_WIN32 #define ILUT_USE_WIN32
#elif _WIN32 #elif _WIN32
//#ifdef __GNUC__ //__CYGWIN32__ (Cygwin seems to not define this wi th DevIL builds) //#ifdef __GNUC__ //__CYGWIN32__ (Cygwin seems to not define this wi th DevIL builds)
#include "config.h" #define ILUT_USE_WIN32
#include "IL/config.h"
/*// Temporary fix for the SDL main() linker bug. // Temporary fix for the SDL main() linker bug.
#ifdef ILUT_USE_SDL //#ifdef ILUT_USE_SDL
#undef ILUT_USE_SDL //#undef ILUT_USE_SDL
#endif//ILUT_USE_SDL*/ //#endif//ILUT_USE_SDL
/*#else //#else
#define ILUT_USE_WIN32 // #define ILUT_USE_WIN32
#define ILUT_USE_OPENGL // #define ILUT_USE_OPENGL
#define ILUT_USE_SDL // #define ILUT_USE_SDL
#define ILUT_USE_DIRECTX8 // #define ILUT_USE_DIRECTX8
#endif*/ //#endif
#elif BEOS // Don't know the #define #elif BEOS // Don't know the #define
#define ILUT_USE_BEOS #define ILUT_USE_BEOS
#define ILUT_USE_OPENGL #define ILUT_USE_OPENGL
#elif MACOSX #elif MACOSX
#define ILUT_USE_OPENGL #define ILUT_USE_OPENGL
#else #else
/*
* We are surely using a *nix so the configure script // We are surely using a *nix so the configure script
* may have written the configured config.h header // may have written the configured config.h header
*/ #include "IL/config.h"
#include "config.h"
#endif #endif
*/
#if (defined(_WIN32) || defined(_WIN64))
#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__)
#pragma comment(lib, "ILUT.lib")
#endif
#endif
#include <IL/ilut_config.h>
#endif
//this should remain private and hidden
//#include "IL/config.h"
//////////////
// OpenGL
//////////////
// ImageLib Utility Toolkit's OpenGL Functions
#ifdef ILUT_USE_OPENGL #ifdef ILUT_USE_OPENGL
#if defined(_MSC_VER) || defined(_WIN32) #if defined(_MSC_VER) || defined(_WIN32)
//#define WIN32_LEAN_AND_MEAN //#define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#endif//_MSC_VER #endif//_MSC_VER
#ifdef __APPLE__ #ifdef __APPLE__
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
#else #else
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <GL/glu.h>
#endif//__APPLE__ #endif//__APPLE__
#endif
ILAPI GLuint ILAPIENTRY ilutGLBindTexImage(ILvoid); #ifdef ILUT_USE_WIN32
ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(ILvoid); //#define WIN32_LEAN_AND_MEAN
ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(ILvoid); #ifdef _DEBUG
ILAPI GLuint ILAPIENTRY ilutGLLoadImage(const ILstring FileName); #define _CRTDBG_MAP_ALLOC
ILAPI ILboolean ILAPIENTRY ilutGLScreen(ILvoid); #include <stdlib.h>
ILAPI ILboolean ILAPIENTRY ilutGLScreenie(ILvoid); #ifndef _WIN32_WCE
ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(const ILstring FileName, #include <crtdbg.h>
GLuint TexID); #endif
ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID); #endif
#include <windows.h>
#endif
//
// If we can avoid including these in all cases thing tend to break less
// and we can keep all of them defined as available
//
// Kriss
//
// ImageLib Utility Toolkit's Allegro Functions
#ifdef ILUT_USE_ALLEGRO
// #include <allegro.h>
#endif//ILUT_USE_ALLEGRO
#ifdef ILUT_USE_SDL
// #include <SDL.h>
#endif
#ifdef ILUT_USE_DIRECTX8
#include <d3d8.h>
#endif//ILUT_USE_DIRECTX9
#ifdef ILUT_USE_DIRECTX9
#include <d3d9.h>
#endif//ILUT_USE_DIRECTX9
#ifdef ILUT_USE_DIRECTX10
#pragma warning(push)
#pragma warning(disable : 4201) // Disables 'nonstandard extension
used : nameless struct/union' warning
#include <rpcsal.h>
#include <sal.h>
#include <d3d10.h>
#pragma warning(pop)
#endif//ILUT_USE_DIRECTX10
#ifdef ILUT_USE_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef ILUT_USE_XSHM
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#endif//ILUT_USE_XSHM
#endif//ILUT_USE_X11
//-------------------------------------------------------------------------
----
// Functions
//-------------------------------------------------------------------------
----
#ifdef __cplusplus
extern "C" {
#endif
// ImageLib Utility Toolkit Functions
ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode);
ILAPI void ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Para
m);
ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode);
ILAPI void ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILstring ILAPIENTRY ilutGetString(ILenum StringName);
ILAPI void ILAPIENTRY ilutInit(void);
ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode);
ILAPI void ILAPIENTRY ilutPopAttrib(void);
ILAPI void ILAPIENTRY ilutPushAttrib(ILuint Bits);
ILAPI void ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param);
ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer);
// ImageLib Utility Toolkit's OpenGL Functions
#ifdef ILUT_USE_OPENGL
ILAPI GLuint ILAPIENTRY ilutGLBindTexImage();
ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(void);
ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(void);
ILAPI GLuint ILAPIENTRY ilutGLLoadImage(ILstring FileName);
ILAPI ILboolean ILAPIENTRY ilutGLScreen(void);
ILAPI ILboolean ILAPIENTRY ilutGLScreenie(void);
ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(ILstring FileName, GLuint
TexID);
ILAPI ILboolean ILAPIENTRY ilutGLSubTex2D(GLuint TexID, ILuint XOff,
ILuint YOff);
ILAPI ILboolean ILAPIENTRY ilutGLSubTex3D(GLuint TexID, ILuint XOff,
ILuint YOff, ILuint ZOff);
ILAPI ILboolean ILAPIENTRY ilutGLSetTex2D(GLuint TexID);
ILAPI ILboolean ILAPIENTRY ilutGLSetTex3D(GLuint TexID);
ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level); ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level);
ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, I Luint YOff);
ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID); // Deprecate
d - use ilutGLSetTex2D.
ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, I
Luint YOff); // Use ilutGLSubTex2D.
#endif//ILUT_USE_OPENGL #endif//ILUT_USE_OPENGL
// ImageLib Utility Toolkit's Allegro Functions // ImageLib Utility Toolkit's Allegro Functions
#ifdef ILUT_USE_ALLEGRO #ifdef ILUT_USE_ALLEGRO
#include <allegro.h> #ifdef __cplusplus
ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(const ILstring FileName) extern "C" {
; #endif
#include <allegro.h>
#ifdef __cplusplus
}
#endif
ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName);
ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal); ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal);
#endif//ILUT_USE_ALLEGRO #endif//ILUT_USE_ALLEGRO
// ImageLib Utility Toolkit's SDL Functions // ImageLib Utility Toolkit's SDL Functions
#ifdef ILUT_USE_SDL #ifdef ILUT_USE_SDL
#include <SDL.h> ILAPI struct SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigne
ILAPI SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigned d int flags);
int flags); ILAPI struct SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(ILstrin
ILAPI SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(const ILs g FileName);
tring FileName); ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(struct SDL_Su
ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(SDL_Surf rface *Bitmap);
ace *Bitmap);
#endif//ILUT_USE_SDL #endif//ILUT_USE_SDL
// ImageLib Utility Toolkit's BeOS Functions // ImageLib Utility Toolkit's BeOS Functions
#ifdef ILUT_USE_BEOS #ifdef ILUT_USE_BEOS
ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(ILvoid); ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(void);
#endif//ILUT_USE_BEOS #endif//ILUT_USE_BEOS
// ImageLib Utility Toolkit's Win32 GDI Functions // ImageLib Utility Toolkit's Win32 GDI Functions
#ifdef ILUT_USE_WIN32 #ifdef ILUT_USE_WIN32
#ifdef _WIN32 ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC);
//#define WIN32_LEAN_AND_MEAN ILAPI HBITMAP ILAPIENTRY ilutConvertSliceToHBitmap(HDC hDC, ILuint
#include <windows.h> slice);
ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC); ILAPI void ILAPIENTRY ilutFreePaddedData(ILubyte *Data);
ILAPI ILvoid ILAPIENTRY ilutFreePaddedData(ILubyte *Data) ILAPI void ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info);
; ILAPI HPALETTE ILAPIENTRY ilutGetHPal(void);
ILAPI ILvoid ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info); ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(void);
ILAPI HPALETTE ILAPIENTRY ilutGetHPal(ILvoid); ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(void);
ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(ILvoid); ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint I
ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(ILvoid); D, ILstring ResourceType, ILenum Type);
ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap);
ILint ID, const ILstring ResourceType, ILenum Type); ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal);
ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap); ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(void);
ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal); ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(ILstring FileName, HDC h
ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(ILvoid); DC);
ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(const ILstring F ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(ILstring Url);
ileName, HDC hDC); ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, IL
ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(const ILstring Url uint Width, ILuint Height, HDC hDC);
); ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(ILstring FileName, HBITM
ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint AP Bitmap);
YPos, ILuint Width, ILuint Height, HDC hDC);
ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(const ILstring F
ileName, HBITMAP Bitmap);
#endif//_WIN32
#endif//ILUT_USE_WIN32 #endif//ILUT_USE_WIN32
// ImageLib Utility Toolkit's DirectX 8 Functions
#ifdef ILUT_USE_DIRECTX8
// ILAPI void ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels);
ILAPI struct IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(struct ID
irect3DDevice8 *Device);
ILAPI struct IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTextu
re(struct IDirect3DDevice8 *Device);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(struct IDirect3DDevic
e8 *Device, char *FileName, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(struct IDirect3DDe
vice8 *Device, char *FileName, struct IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(struct IDirec
t3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DTexture8 **Tex
ture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(struct IDi
rect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTextu
re8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(struct IDirect3
DDevice8 *Device, ILHANDLE File, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(struct IDire
ct3DDevice8 *Device, ILHANDLE File, struct IDirect3DVolumeTexture8 **Textur
e);
// These two are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(struct IDirect3DD
evice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTextu
re8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(struct IDirect
3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVo
lumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(struct IDirect3DDevic
e8 *Device, struct IDirect3DSurface8 *Surface);
#endif//ILUT_USE_DIRECTX8
#ifdef ILUT_USE_DIRECTX9 #ifdef ILUT_USE_DIRECTX9
#ifdef _WIN32 #pragma warning(push)
#include <d3d9.h> #pragma warning(disable : 4115) // Disables 'named type definition
// ILAPI ILvoid ILAPIENTRY ilutD3D9MipFunc(ILuint NumLevels) in parentheses' warning
; // ILAPI void ILAPIENTRY ilutD3D9MipFunc(ILuint NumLevels);
ILAPI IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture(IDirect3 ILAPI struct IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture
DDevice9 *Device); (struct IDirect3DDevice9* Device);
ILAPI IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeText ILAPI struct IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTextu
ure(IDirect3DDevice9 *Device); re (struct IDirect3DDevice9* Device);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(IDirect3DDevi ILAPI struct IDirect3DCubeTexture9* ILAPIENTRY ilutD3D9CubeTextur
ce9 *Device, char *FileName, IDirect3DTexture9 **Texture); e (struct IDirect3DDevice9* Device);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(IDirect3DD
evice9 *Device, char *FileName, IDirect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(IDire
ct3DDevice9 *Device, ILvoid *Lump, ILuint Size, IDirect3DTexture9 **Texture
);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(ID
irect3DDevice9 *Device, ILvoid *Lump, ILuint Size, IDirect3DVolumeTexture9
**Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(IDirect
3DDevice9 *Device, ILHANDLE File, IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(IDir
ect3DDevice9 *Device, ILHANDLE File, IDirect3DVolumeTexture9 **Texture);
// These two are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(IDirect3D
Device9 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DTexture9 **
Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(IDirec
t3DDevice9 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DVolumeTe
xture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(IDirect3DDevi ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFile(struct IDirect3DDevi
ce9 *Device, IDirect3DSurface9 *Surface); ce9 *Device, ILconst_string FileName, struct IDirect3DCubeTexture9 **Textur
#endif//_WIN32 e);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileInMemory(struct IDire
ct3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DCubeTexture9
**Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileHandle(struct IDirect
3DDevice9 *Device, ILHANDLE File, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromResource(struct IDirect3D
Device9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDir
ect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(struct IDirect3DDevic
e9 *Device, ILconst_string FileName, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(struct IDirect3DDe
vice9 *Device, ILconst_string FileName, struct IDirect3DVolumeTexture9 **Te
xture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(struct IDirec
t3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DTexture9 **Tex
ture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(struct IDi
rect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTextu
re9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(struct IDirect3
DDevice9 *Device, ILHANDLE File, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(struct IDire
ct3DDevice9 *Device, ILHANDLE File, struct IDirect3DVolumeTexture9 **Textur
e);
// These three are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(struct IDirect3DD
evice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDire
ct3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(struct IDirect
3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct ID
irect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(struct IDirect3DDevic
e9 *Device, struct IDirect3DSurface9 *Surface);
#pragma warning(pop)
#endif//ILUT_USE_DIRECTX9 #endif//ILUT_USE_DIRECTX9
// ImageLib Utility Toolkit's DirectX 8 Functions #ifdef ILUT_USE_DIRECTX10
#ifdef ILUT_USE_DIRECTX8 ILAPI ID3D10Texture2D* ILAPIENTRY ilutD3D10Texture(ID3D10Device *Dev
#ifdef _WIN32 ice);
#ifndef _D3D8_H_ ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFile(ID3D10Device *Device
#include <d3d8.h> , ILconst_string FileName, ID3D10Texture2D **Texture);
#endif ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileInMemory(ID3D10Device
// ILAPI ILvoid ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels) *Device, void *Lump, ILuint Size, ID3D10Texture2D **Texture);
; ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromResource(ID3D10Device *De
ILAPI IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(IDirect3 vice, HMODULE SrcModule, ILconst_string SrcResource, ID3D10Texture2D **Text
DDevice8 *Device); ure);
ILAPI IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeText ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileHandle(ID3D10Device *
ure(IDirect3DDevice8 *Device); Device, ILHANDLE File, ID3D10Texture2D **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(IDirect3DDevi #endif//ILUT_USE_DIRECTX10
ce8 *Device, char *FileName, IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(IDirect3DD
evice8 *Device, char *FileName, IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(IDire
ct3DDevice8 *Device, ILvoid *Lump, ILuint Size, IDirect3DTexture8 **Texture
);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(ID
irect3DDevice8 *Device, ILvoid *Lump, ILuint Size, IDirect3DVolumeTexture8
**Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(IDirect
3DDevice8 *Device, ILHANDLE File, IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(IDir
ect3DDevice8 *Device, ILHANDLE File, IDirect3DVolumeTexture8 **Texture);
// These two are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(IDirect3D
Device8 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DTexture8 **
Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(IDirec
t3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DVolumeTe
xture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(IDirect3DDevi #ifdef ILUT_USE_X11
ce8 *Device, IDirect3DSurface8 *Surface); ILAPI XImage * ILAPIENTRY ilutXCreateImage( Display* );
#endif//_WIN32 ILAPI Pixmap ILAPIENTRY ilutXCreatePixmap( Display*,Drawable );
#endif//ILUT_USE_DIRECTX8 ILAPI XImage * ILAPIENTRY ilutXLoadImage( Display*,char* );
ILAPI Pixmap ILAPIENTRY ilutXLoadPixmap( Display*,Drawable,char* );
#ifdef ILUT_USE_XSHM
ILAPI XImage * ILAPIENTRY ilutXShmCreateImage( Display*,XShmSegmentI
nfo* );
ILAPI void ILAPIENTRY ilutXShmDestroyImage( Display*,XImage*,XShmSeg
mentInfo* );
ILAPI Pixmap ILAPIENTRY ilutXShmCreatePixmap( Display*,Drawable,XShm
SegmentInfo* );
ILAPI void ILAPIENTRY ilutXShmFreePixmap( Display*,Pixmap,XShmSegmen
tInfo* );
ILAPI XImage * ILAPIENTRY ilutXShmLoadImage( Display*,char*,XShmSegm
entInfo* );
ILAPI Pixmap ILAPIENTRY ilutXShmLoadPixmap( Display*,Drawable,char*,
XShmSegmentInfo* );
#endif//ILUT_USE_XSHM
#endif//ILUT_USE_X11
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // __ILUT_H__ #endif // __ILUT_H__
#endif // __ilut_h_ #endif // __ilut_h_
 End of changes. 30 change blocks. 
207 lines changed or deleted 349 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/