il.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //
00003 // ImageLib Sources
00004 // Copyright (C) 2000-2009 by Denton Woods
00005 // Last modified: 02/05/2009
00006 //
00007 // Filename: IL/il.h
00008 //
00009 // Description: The main include file for DevIL
00010 //
00011 //-----------------------------------------------------------------------------
00012 
00013 // Doxygen comment
00018 #ifndef __il_h_
00019 #ifndef __IL_H__
00020 
00021 #define __il_h_
00022 #define __IL_H__
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 //this define controls if floats and doubles are clampled to [0..1]
00029 //during conversion. It takes a little more time, but it is the correct
00030 //way of doing this. If you are sure your floats are always valid,
00031 //you can undefine this value...
00032 #define CLAMP_HALF              1
00033 #define CLAMP_FLOATS    1
00034 #define CLAMP_DOUBLES   1
00035 
00036 /*#ifdef _WIN32_WCE
00037         #define IL_NO_EXR
00038         #define IL_NO_GIF
00039         #define IL_NO_JP2
00040         #define IL_NO_JPG
00041         #define IL_NO_MNG
00042         #define IL_NO_PNG
00043         #define IL_NO_TIF
00044         #define IL_NO_LCMS
00045 #endif //_WIN32_WCE
00046 
00047 #ifdef DJGPP
00048         #define IL_NO_EXR
00049         #define IL_NO_GIF
00050         #define IL_NO_JP2
00051         #define IL_NO_JPG
00052         #define IL_NO_MNG
00053         #define IL_NO_PNG
00054         #define IL_NO_TIF
00055         #define IL_NO_LCMS
00056 #endif //DJGPP*/
00057 
00058 #ifdef _WIN32
00059         #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
00060                 #if defined(_MSC_VER) || defined(__BORLANDC__)
00061                         #pragma comment(lib, "DevIL.lib")
00062                 #endif
00063         #endif
00064 #endif
00065 
00066 #ifdef RESTRICT_KEYWORD
00067 #define RESTRICT restrict
00068 #define CONST_RESTRICT const restrict
00069 #else
00070 #define RESTRICT
00071 #define CONST_RESTRICT const
00072 #endif
00073 
00074 #include <stdio.h>
00075 
00076 typedef unsigned int   ILenum;
00077 typedef unsigned char  ILboolean;
00078 typedef unsigned int   ILbitfield;
00079 typedef signed char    ILbyte;
00080 typedef signed short   ILshort;
00081 typedef int                ILint;
00082 typedef size_t         ILsizei;
00083 typedef unsigned char  ILubyte;
00084 typedef unsigned short ILushort;
00085 typedef unsigned int   ILuint;
00086 typedef float          ILfloat;
00087 typedef float          ILclampf;
00088 typedef double         ILdouble;
00089 typedef double         ILclampd;
00090 
00091 #ifdef _MSC_VER
00092 typedef __int64          ILint64;
00093 typedef unsigned __int64 ILuint64;
00094 #else
00095 typedef long long int          ILint64;
00096 typedef long long unsigned int ILuint64;
00097 #endif
00098 
00099 
00100 #include <limits.h>
00101 #ifdef _UNICODE
00102         #ifndef _WIN32_WCE
00103                 #include <wchar.h>
00104         #endif
00105         //if we use a define instead of a typedef,
00106         //ILconst_string works as intended
00107         #define ILchar wchar_t
00108         #define ILstring wchar_t*
00109         #define ILconst_string  wchar_t const *
00110 #else
00111         //if we use a define instead of a typedef,
00112         //ILconst_string works as intended
00113         #define ILchar char
00114         #define ILstring char*
00115         #define ILconst_string char const *
00116 #endif //_UNICODE
00117 
00118 #define IL_FALSE                        0
00119 #define IL_TRUE                         1
00120 
00121 //  Matches OpenGL's right now.
00123 #define IL_COLOUR_INDEX     0x1900
00124 #define IL_COLOR_INDEX      0x1900
00125 #define IL_ALPHA                        0x1906
00126 #define IL_RGB              0x1907
00127 #define IL_RGBA             0x1908
00128 #define IL_BGR              0x80E0
00129 #define IL_BGRA             0x80E1
00130 #define IL_LUMINANCE        0x1909
00131 #define IL_LUMINANCE_ALPHA  0x190A
00132 
00134 #define IL_BYTE           0x1400
00135 #define IL_UNSIGNED_BYTE  0x1401
00136 #define IL_SHORT          0x1402
00137 #define IL_UNSIGNED_SHORT 0x1403
00138 #define IL_INT            0x1404
00139 #define IL_UNSIGNED_INT   0x1405
00140 #define IL_FLOAT          0x1406
00141 #define IL_DOUBLE         0x140A
00142 #define IL_HALF           0x140B
00143 
00144 
00145 #define IL_MAX_BYTE                             SCHAR_MAX
00146 #define IL_MAX_UNSIGNED_BYTE    UCHAR_MAX
00147 #define IL_MAX_SHORT                    SHRT_MAX
00148 #define IL_MAX_UNSIGNED_SHORT   USHRT_MAX
00149 #define IL_MAX_INT                              INT_MAX
00150 #define IL_MAX_UNSIGNED_INT     UINT_MAX
00151 
00152 #define IL_LIMIT(x,m,M)         (x<m?m:(x>M?M:x))
00153 #define IL_CLAMP(x)             IL_LIMIT(x,0,1)
00154 
00155 #define IL_VENDOR   0x1F00
00156 #define IL_LOAD_EXT 0x1F01
00157 #define IL_SAVE_EXT 0x1F02
00158 
00159 
00160 //
00161 // IL-specific #define's
00162 //
00163 
00164 #define IL_VERSION_1_7_7 1
00165 #define IL_VERSION       177
00166 
00167 
00168 // Attribute Bits
00169 #define IL_ORIGIN_BIT          0x00000001
00170 #define IL_FILE_BIT            0x00000002
00171 #define IL_PAL_BIT             0x00000004
00172 #define IL_FORMAT_BIT          0x00000008
00173 #define IL_TYPE_BIT            0x00000010
00174 #define IL_COMPRESS_BIT        0x00000020
00175 #define IL_LOADFAIL_BIT        0x00000040
00176 #define IL_FORMAT_SPECIFIC_BIT 0x00000080
00177 #define IL_ALL_ATTRIB_BITS     0x000FFFFF
00178 
00179 
00180 // Palette types
00181 #define IL_PAL_NONE   0x0400
00182 #define IL_PAL_RGB24  0x0401
00183 #define IL_PAL_RGB32  0x0402
00184 #define IL_PAL_RGBA32 0x0403
00185 #define IL_PAL_BGR24  0x0404
00186 #define IL_PAL_BGR32  0x0405
00187 #define IL_PAL_BGRA32 0x0406
00188 
00189 
00190 // Image types
00191 #define IL_TYPE_UNKNOWN 0x0000
00192 #define IL_BMP          0x0420  //!< Microsoft Windows Bitmap - .bmp extension
00193 #define IL_CUT          0x0421  //!< Dr. Halo - .cut extension
00194 #define IL_DOOM         0x0422  //!< DooM walls - no specific extension
00195 #define IL_DOOM_FLAT    0x0423  //!< DooM flats - no specific extension
00196 #define IL_ICO          0x0424  //!< Microsoft Windows Icons and Cursors - .ico and .cur extensions
00197 #define IL_JPG          0x0425  //!< JPEG - .jpg, .jpe and .jpeg extensions
00198 #define IL_JFIF         0x0425  //!<
00199 #define IL_LBM          0x0426  //!< Interlaced bitmap - .lbm extension
00200 #define IL_PCD          0x0427  //!< Kodak PhotoCD - .pcd extension
00201 #define IL_PCX          0x0428  //!< ZSoft PCX - .pcx extension
00202 #define IL_PIC          0x0429  //!< PIC - .pic extension
00203 #define IL_PNG          0x042A  //!< Portable Network Graphics - .png extension
00204 #define IL_PNM          0x042B  //!< Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions
00205 #define IL_SGI          0x042C  //!< Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions
00206 #define IL_TGA          0x042D  //!< TrueVision Targa File - .tga, .vda, .icb and .vst extensions
00207 #define IL_TIF          0x042E  //!< Tagged Image File Format - .tif and .tiff extensions
00208 #define IL_CHEAD        0x042F  //!< C-Style Header - .h extension
00209 #define IL_RAW          0x0430  //!< Raw Image Data - any extension
00210 #define IL_MDL          0x0431  //!< Half-Life Model Texture - .mdl extension
00211 #define IL_WAL          0x0432  //!< Quake 2 Texture - .wal extension
00212 #define IL_LIF          0x0434  //!< Homeworld Texture - .lif extension
00213 #define IL_MNG          0x0435  //!< Multiple-image Network Graphics - .mng extension
00214 #define IL_JNG          0x0435  //!< 
00215 #define IL_GIF          0x0436  //!< Graphics Interchange Format - .gif extension
00216 #define IL_DDS          0x0437  //!< DirectDraw Surface - .dds extension
00217 #define IL_DCX          0x0438  //!< ZSoft Multi-PCX - .dcx extension
00218 #define IL_PSD          0x0439  //!< Adobe PhotoShop - .psd extension
00219 #define IL_EXIF         0x043A  //!< 
00220 #define IL_PSP          0x043B  //!< PaintShop Pro - .psp extension
00221 #define IL_PIX          0x043C  //!< PIX - .pix extension
00222 #define IL_PXR          0x043D  //!< Pixar - .pxr extension
00223 #define IL_XPM          0x043E  //!< X Pixel Map - .xpm extension
00224 #define IL_HDR          0x043F  //!< Radiance High Dynamic Range - .hdr extension
00225 #define IL_ICNS                 0x0440  //!< Macintosh Icon - .icns extension
00226 #define IL_JP2                  0x0441  //!< Jpeg 2000 - .jp2 extension
00227 #define IL_EXR                  0x0442  //!< OpenEXR - .exr extension
00228 #define IL_WDP                  0x0443  //!< 
00229 #define IL_VTF                  0x0444  //!< Valve Texture Format - .vtf extension
00230 #define IL_WBMP                 0x0445  //!< Wireless Bitmap - .wbmp extension
00231 #define IL_SUN                  0x0446  //!< Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions
00232 #define IL_IFF                  0x0447  //!< Interchange File Format - .iff extension
00233 #define IL_TPL                  0x0448  //!< Gamecube Texture - .tpl extension
00234 
00235 
00236 #define IL_JASC_PAL     0x0475  //!< PaintShop Pro Palette
00237 
00238 
00239 // Error Types
00240 #define IL_NO_ERROR             0x0000
00241 #define IL_INVALID_ENUM         0x0501
00242 #define IL_OUT_OF_MEMORY        0x0502
00243 #define IL_FORMAT_NOT_SUPPORTED 0x0503
00244 #define IL_INTERNAL_ERROR       0x0504
00245 #define IL_INVALID_VALUE        0x0505
00246 #define IL_ILLEGAL_OPERATION    0x0506
00247 #define IL_ILLEGAL_FILE_VALUE   0x0507
00248 #define IL_INVALID_FILE_HEADER  0x0508
00249 #define IL_INVALID_PARAM        0x0509
00250 #define IL_COULD_NOT_OPEN_FILE  0x050A
00251 #define IL_INVALID_EXTENSION    0x050B
00252 #define IL_FILE_ALREADY_EXISTS  0x050C
00253 #define IL_OUT_FORMAT_SAME      0x050D
00254 #define IL_STACK_OVERFLOW       0x050E
00255 #define IL_STACK_UNDERFLOW      0x050F
00256 #define IL_INVALID_CONVERSION   0x0510
00257 #define IL_BAD_DIMENSIONS       0x0511
00258 #define IL_FILE_READ_ERROR      0x0512  // 05/12/2002: Addition by Sam.
00259 #define IL_FILE_WRITE_ERROR     0x0512
00260 
00261 #define IL_LIB_GIF_ERROR  0x05E1
00262 #define IL_LIB_JPEG_ERROR 0x05E2
00263 #define IL_LIB_PNG_ERROR  0x05E3
00264 #define IL_LIB_TIFF_ERROR 0x05E4
00265 #define IL_LIB_MNG_ERROR  0x05E5
00266 #define IL_LIB_JP2_ERROR  0x05E6
00267 #define IL_LIB_EXR_ERROR  0x05E7
00268 #define IL_UNKNOWN_ERROR  0x05FF
00269 
00270 
00271 // Origin Definitions
00272 #define IL_ORIGIN_SET        0x0600
00273 #define IL_ORIGIN_LOWER_LEFT 0x0601
00274 #define IL_ORIGIN_UPPER_LEFT 0x0602
00275 #define IL_ORIGIN_MODE       0x0603
00276 
00277 
00278 // Format and Type Mode Definitions
00279 #define IL_FORMAT_SET  0x0610
00280 #define IL_FORMAT_MODE 0x0611
00281 #define IL_TYPE_SET    0x0612
00282 #define IL_TYPE_MODE   0x0613
00283 
00284 
00285 // File definitions
00286 #define IL_FILE_OVERWRITE       0x0620
00287 #define IL_FILE_MODE            0x0621
00288 
00289 
00290 // Palette definitions
00291 #define IL_CONV_PAL                     0x0630
00292 
00293 
00294 // Load fail definitions
00295 #define IL_DEFAULT_ON_FAIL      0x0632
00296 
00297 
00298 // Key colour and alpha definitions
00299 #define IL_USE_KEY_COLOUR       0x0635
00300 #define IL_USE_KEY_COLOR        0x0635
00301 #define IL_BLIT_BLEND           0x0636
00302 
00303 
00304 // Interlace definitions
00305 #define IL_SAVE_INTERLACED      0x0639
00306 #define IL_INTERLACE_MODE       0x063A
00307 
00308 
00309 // Quantization definitions
00310 #define IL_QUANTIZATION_MODE 0x0640
00311 #define IL_WU_QUANT          0x0641
00312 #define IL_NEU_QUANT         0x0642
00313 #define IL_NEU_QUANT_SAMPLE  0x0643
00314 #define IL_MAX_QUANT_INDEXS  0x0644 //XIX : ILint : Maximum number of colors to reduce to, default of 256. and has a range of 2-256
00315 #define IL_MAX_QUANT_INDICES 0x0644 // Redefined, since the above #define is misspelled
00316 
00317 
00318 // Hints
00319 #define IL_FASTEST          0x0660
00320 #define IL_LESS_MEM         0x0661
00321 #define IL_DONT_CARE        0x0662
00322 #define IL_MEM_SPEED_HINT   0x0665
00323 #define IL_USE_COMPRESSION  0x0666
00324 #define IL_NO_COMPRESSION   0x0667
00325 #define IL_COMPRESSION_HINT 0x0668
00326 
00327 
00328 // Compression
00329 #define IL_NVIDIA_COMPRESS      0x0670
00330 #define IL_SQUISH_COMPRESS      0x0671
00331 
00332 
00333 // Subimage types
00334 #define IL_SUB_NEXT   0x0680
00335 #define IL_SUB_MIPMAP 0x0681
00336 #define IL_SUB_LAYER  0x0682
00337 
00338 
00339 // Compression definitions
00340 #define IL_COMPRESS_MODE 0x0700
00341 #define IL_COMPRESS_NONE 0x0701
00342 #define IL_COMPRESS_RLE  0x0702
00343 #define IL_COMPRESS_LZO  0x0703
00344 #define IL_COMPRESS_ZLIB 0x0704
00345 
00346 
00347 // File format-specific values
00348 #define IL_TGA_CREATE_STAMP        0x0710
00349 #define IL_JPG_QUALITY             0x0711
00350 #define IL_PNG_INTERLACE           0x0712
00351 #define IL_TGA_RLE                 0x0713
00352 #define IL_BMP_RLE                 0x0714
00353 #define IL_SGI_RLE                 0x0715
00354 #define IL_TGA_ID_STRING           0x0717
00355 #define IL_TGA_AUTHNAME_STRING     0x0718
00356 #define IL_TGA_AUTHCOMMENT_STRING  0x0719
00357 #define IL_PNG_AUTHNAME_STRING     0x071A
00358 #define IL_PNG_TITLE_STRING        0x071B
00359 #define IL_PNG_DESCRIPTION_STRING  0x071C
00360 #define IL_TIF_DESCRIPTION_STRING  0x071D
00361 #define IL_TIF_HOSTCOMPUTER_STRING 0x071E
00362 #define IL_TIF_DOCUMENTNAME_STRING 0x071F
00363 #define IL_TIF_AUTHNAME_STRING     0x0720
00364 #define IL_JPG_SAVE_FORMAT         0x0721
00365 #define IL_CHEAD_HEADER_STRING     0x0722
00366 #define IL_PCD_PICNUM              0x0723
00367 #define IL_JPG_PROGRESSIVE         0x0725
00368 
00369 #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
00370 
00371 // DXTC definitions
00372 #define IL_DXTC_FORMAT      0x0705
00373 #define IL_DXT1             0x0706
00374 #define IL_DXT2             0x0707
00375 #define IL_DXT3             0x0708
00376 #define IL_DXT4             0x0709
00377 #define IL_DXT5             0x070A
00378 #define IL_DXT_NO_COMP      0x070B
00379 #define IL_KEEP_DXTC_DATA   0x070C
00380 #define IL_DXTC_DATA_FORMAT 0x070D
00381 #define IL_3DC              0x070E
00382 #define IL_RXGB             0x070F
00383 #define IL_ATI1N            0x0710
00384 #define IL_DXT1A            0x0711  // Normally the same as IL_DXT1, except for nVidia Texture Tools.
00385 
00386 // Environment map definitions
00387 #define IL_CUBEMAP_POSITIVEX 0x00000400
00388 #define IL_CUBEMAP_NEGATIVEX 0x00000800
00389 #define IL_CUBEMAP_POSITIVEY 0x00001000
00390 #define IL_CUBEMAP_NEGATIVEY 0x00002000
00391 #define IL_CUBEMAP_POSITIVEZ 0x00004000
00392 #define IL_CUBEMAP_NEGATIVEZ 0x00008000
00393 #define IL_SPHEREMAP         0x00010000
00394 
00395 
00396 // Values
00397 #define IL_VERSION_NUM           0x0DE2
00398 #define IL_IMAGE_WIDTH           0x0DE4
00399 #define IL_IMAGE_HEIGHT          0x0DE5
00400 #define IL_IMAGE_DEPTH           0x0DE6
00401 #define IL_IMAGE_SIZE_OF_DATA    0x0DE7
00402 #define IL_IMAGE_BPP             0x0DE8
00403 #define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8
00404 #define IL_IMAGE_BPP             0x0DE8
00405 #define IL_IMAGE_BITS_PER_PIXEL  0x0DE9
00406 #define IL_IMAGE_FORMAT          0x0DEA
00407 #define IL_IMAGE_TYPE            0x0DEB
00408 #define IL_PALETTE_TYPE          0x0DEC
00409 #define IL_PALETTE_SIZE          0x0DED
00410 #define IL_PALETTE_BPP           0x0DEE
00411 #define IL_PALETTE_NUM_COLS      0x0DEF
00412 #define IL_PALETTE_BASE_TYPE     0x0DF0
00413 #define IL_NUM_FACES             0x0DE1
00414 #define IL_NUM_IMAGES            0x0DF1
00415 #define IL_NUM_MIPMAPS           0x0DF2
00416 #define IL_NUM_LAYERS            0x0DF3
00417 #define IL_ACTIVE_IMAGE          0x0DF4
00418 #define IL_ACTIVE_MIPMAP         0x0DF5
00419 #define IL_ACTIVE_LAYER          0x0DF6
00420 #define IL_ACTIVE_FACE           0x0E00
00421 #define IL_CUR_IMAGE             0x0DF7
00422 #define IL_IMAGE_DURATION        0x0DF8
00423 #define IL_IMAGE_PLANESIZE       0x0DF9
00424 #define IL_IMAGE_BPC             0x0DFA
00425 #define IL_IMAGE_OFFX            0x0DFB
00426 #define IL_IMAGE_OFFY            0x0DFC
00427 #define IL_IMAGE_CUBEFLAGS       0x0DFD
00428 #define IL_IMAGE_ORIGIN          0x0DFE
00429 #define IL_IMAGE_CHANNELS        0x0DFF
00430 
00431 # if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0))
00432 // __attribute__((deprecated)) is supported by GCC 3.1 and later.
00433 #  define DEPRECATED(D) D __attribute__((deprecated))
00434 # elif defined _MSC_VER && _MSC_VER >= 1300
00435 // __declspec(deprecated) is supported by MSVC 7.0 and later.
00436 #  define DEPRECATED(D) __declspec(deprecated) D
00437 # else
00438 #  define DEPRECATED (D) D
00439 # endif
00440 
00441 //
00442 // Section shamelessly modified from the glut header.
00443 //
00444 
00445 // This is from Win32's <windef.h>
00446 #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
00447         #define ILAPIENTRY __stdcall 
00448         #define IL_PACKSTRUCT
00449 //#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug 840364
00450 #elif defined( __GNUC__ )
00451   // this should work for any of the above commented platforms 
00452   // plus any platform using GCC
00453         #ifdef __MINGW32__
00454                 #define ILAPIENTRY __stdcall
00455         #else
00456                 #define ILAPIENTRY
00457         #endif
00458         #define IL_PACKSTRUCT __attribute__ ((packed))
00459 #else
00460         #define ILAPIENTRY
00461         #define IL_PACKSTRUCT
00462 #endif
00463 
00464 // This is from Win32's <wingdi.h> and <winnt.h>
00465 #if defined(__LCC__)
00466         #define ILAPI __stdcall
00467 #elif defined(_WIN32) //changed 20031221 to fix bug 840421
00468         #ifdef IL_STATIC_LIB
00469                 #define ILAPI
00470         #else
00471                 #ifdef _IL_BUILD_LIBRARY
00472                         #define ILAPI __declspec(dllexport)
00473                 #else
00474                         #define ILAPI __declspec(dllimport)
00475                 #endif
00476         #endif
00477 #elif __APPLE__
00478         #define ILAPI extern
00479 #else
00480         #define ILAPI
00481 #endif
00482 
00483 
00484 #define IL_SEEK_SET     0
00485 #define IL_SEEK_CUR     1
00486 #define IL_SEEK_END     2
00487 #define IL_EOF          -1
00488 
00489 
00490 // Callback functions for file reading
00491 typedef void* ILHANDLE;
00492 typedef void      (ILAPIENTRY *fCloseRProc)(ILHANDLE);
00493 typedef ILboolean (ILAPIENTRY *fEofProc)   (ILHANDLE);
00494 typedef ILint     (ILAPIENTRY *fGetcProc)  (ILHANDLE);
00495 typedef ILHANDLE  (ILAPIENTRY *fOpenRProc) (ILconst_string);
00496 typedef ILint     (ILAPIENTRY *fReadProc)  (void*, ILuint, ILuint, ILHANDLE);
00497 typedef ILint     (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint);
00498 typedef ILint     (ILAPIENTRY *fTellRProc) (ILHANDLE);
00499 
00500 // Callback functions for file writing
00501 typedef void     (ILAPIENTRY *fCloseWProc)(ILHANDLE);
00502 typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string);
00503 typedef ILint    (ILAPIENTRY *fPutcProc)  (ILubyte, ILHANDLE);
00504 typedef ILint    (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint);
00505 typedef ILint    (ILAPIENTRY *fTellWProc) (ILHANDLE);
00506 typedef ILint    (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE);
00507 
00508 // Callback functions for allocation and deallocation
00509 typedef void* (ILAPIENTRY *mAlloc)(const ILsizei);
00510 typedef void  (ILAPIENTRY *mFree) (const void* CONST_RESTRICT);
00511 
00512 // Registered format procedures
00513 typedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string);
00514 typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string);
00515 
00516 
00517 // ImageLib Functions
00518 ILAPI ILboolean ILAPIENTRY ilActiveFace(ILuint Number);
00519 ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number);
00520 ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number);
00521 ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number);
00522 ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName);
00523 ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile);
00524 ILAPI void              ILAPIENTRY ilBindImage(ILuint Image);
00525 ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth);
00526 ILAPI ILboolean ILAPIENTRY ilClampNTSC(void);
00527 ILAPI void              ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
00528 ILAPI ILboolean ILAPIENTRY ilClearImage(void);
00529 ILAPI ILuint    ILAPIENTRY ilCloneCurImage(void);
00530 ILAPI ILubyte*  ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize);
00531 ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode);
00532 ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType);
00533 ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat);
00534 ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src);
00535 ILAPI ILuint    ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);
00536 ILAPI ILuint    ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num);
00537 ILAPI ILboolean ILAPIENTRY ilDefaultImage(void);
00538 ILAPI void              ILAPIENTRY ilDeleteImage(const ILuint Num);
00539 ILAPI void      ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images);
00540 ILAPI ILenum    ILAPIENTRY ilDetermineType(ILconst_string FileName);
00541 ILAPI ILenum    ILAPIENTRY ilDetermineTypeF(ILHANDLE File);
00542 ILAPI ILenum    ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size);
00543 ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode);
00544 ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage(void);
00545 ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface(void);
00546 ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode);
00547 ILAPI void              ILAPIENTRY ilFlipSurfaceDxtcData(void);
00548 ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode);
00549 ILAPI void          ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images);
00550 ILAPI ILuint    ILAPIENTRY ilGenImage(void);
00551 ILAPI ILubyte*  ILAPIENTRY ilGetAlpha(ILenum Type);
00552 ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode);
00553 ILAPI void      ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param);
00554 ILAPI ILubyte*  ILAPIENTRY ilGetData(void);
00555 ILAPI ILuint    ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, ILenum DXTCFormat);
00556 ILAPI ILenum    ILAPIENTRY ilGetError(void);
00557 ILAPI ILint     ILAPIENTRY ilGetInteger(ILenum Mode);
00558 ILAPI void      ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param);
00559 ILAPI ILuint    ILAPIENTRY ilGetLumpPos(void);
00560 ILAPI ILubyte*  ILAPIENTRY ilGetPalette(void);
00561 ILAPI ILconst_string  ILAPIENTRY ilGetString(ILenum StringName);
00562 ILAPI void      ILAPIENTRY ilHint(ILenum Target, ILenum Mode);
00563 ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha(void);
00564 ILAPI void      ILAPIENTRY ilInit(void);
00565 ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format);
00566 ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode);
00567 ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode);
00568 ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image);
00569 ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName);
00570 ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File);
00571 ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size);
00572 ILAPI void      ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
00573 ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName);
00574 ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File);
00575 ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName);
00576 ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size);
00577 ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName);
00578 ILAPI void      ILAPIENTRY ilModAlpha(ILdouble AlphaValue);
00579 ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode);
00580 ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord);
00581 ILAPI void      ILAPIENTRY ilPopAttrib(void);
00582 ILAPI void      ILAPIENTRY ilPushAttrib(ILuint Bits);
00583 ILAPI void      ILAPIENTRY ilRegisterFormat(ILenum Format);
00584 ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load);
00585 ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num);
00586 ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num);
00587 ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num);
00588 ILAPI void      ILAPIENTRY ilRegisterOrigin(ILenum Origin);
00589 ILAPI void      ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type);
00590 ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save);
00591 ILAPI void      ILAPIENTRY ilRegisterType(ILenum Type);
00592 ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext);
00593 ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext);
00594 ILAPI void      ILAPIENTRY ilResetMemory(void); // Deprecated
00595 ILAPI void      ILAPIENTRY ilResetRead(void);
00596 ILAPI void      ILAPIENTRY ilResetWrite(void);
00597 ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName);
00598 ILAPI ILuint    ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File);
00599 ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName);
00600 ILAPI ILuint    ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size);
00601 ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName);
00602 ILAPI ILboolean ILAPIENTRY ilSetAlpha( ILdouble AlphaValue );
00603 ILAPI ILboolean ILAPIENTRY ilSetData(void *Data);
00604 ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration);
00605 ILAPI void      ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param);
00606 ILAPI void      ILAPIENTRY ilSetMemory(mAlloc, mFree);
00607 ILAPI void      ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);
00608 ILAPI void      ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc);
00609 ILAPI void      ILAPIENTRY ilSetString(ILenum Mode, const char *String);
00610 ILAPI void      ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc);
00611 ILAPI void      ILAPIENTRY ilShutDown(void);
00612 ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format);
00613 ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data);
00614 ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte* data);
00615 ILAPI ILenum    ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
00616 ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode);
00617 ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
00618 ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
00619 ILAPI ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
00620 ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName);
00621 
00622 // For all those weirdos that spell "colour" without the 'u'.
00623 #define ilClearColor    ilClearColour
00624 #define ilKeyColor      ilKeyColour
00625 
00626 #define imemclear(x,y) memset(x,0,y);
00627 
00628 #ifdef __cplusplus
00629 }
00630 #endif
00631 
00632 #endif // __IL_H__
00633 #endif // __il_h__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rgbd_registration
Author(s): Ross Kidson
autogenerated on Thu May 23 2013 15:36:53