il.h

来自「SiftGPU is an implementation of SIFT [1]」· C头文件 代码 · 共 634 行 · 第 1/2 页

H
634
字号
// Hints#define IL_FASTEST          0x0660#define IL_LESS_MEM         0x0661#define IL_DONT_CARE        0x0662#define IL_MEM_SPEED_HINT   0x0665#define IL_USE_COMPRESSION  0x0666#define IL_NO_COMPRESSION   0x0667#define IL_COMPRESSION_HINT 0x0668// Compression#define IL_NVIDIA_COMPRESS	0x0670#define IL_SQUISH_COMPRESS	0x0671// Subimage types#define IL_SUB_NEXT   0x0680#define IL_SUB_MIPMAP 0x0681#define IL_SUB_LAYER  0x0682// Compression definitions#define IL_COMPRESS_MODE 0x0700#define IL_COMPRESS_NONE 0x0701#define IL_COMPRESS_RLE  0x0702#define IL_COMPRESS_LZO  0x0703#define IL_COMPRESS_ZLIB 0x0704// File format-specific values#define IL_TGA_CREATE_STAMP        0x0710#define IL_JPG_QUALITY             0x0711#define IL_PNG_INTERLACE           0x0712#define IL_TGA_RLE                 0x0713#define IL_BMP_RLE                 0x0714#define IL_SGI_RLE                 0x0715#define IL_TGA_ID_STRING           0x0717#define IL_TGA_AUTHNAME_STRING     0x0718#define IL_TGA_AUTHCOMMENT_STRING  0x0719#define IL_PNG_AUTHNAME_STRING     0x071A#define IL_PNG_TITLE_STRING        0x071B#define IL_PNG_DESCRIPTION_STRING  0x071C#define IL_TIF_DESCRIPTION_STRING  0x071D#define IL_TIF_HOSTCOMPUTER_STRING 0x071E#define IL_TIF_DOCUMENTNAME_STRING 0x071F#define IL_TIF_AUTHNAME_STRING     0x0720#define IL_JPG_SAVE_FORMAT         0x0721#define IL_CHEAD_HEADER_STRING     0x0722#define IL_PCD_PICNUM              0x0723#define IL_JPG_PROGRESSIVE         0x0725#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#define IL_DXTC_FORMAT      0x0705#define IL_DXT1             0x0706#define IL_DXT2             0x0707#define IL_DXT3             0x0708#define IL_DXT4             0x0709#define IL_DXT5             0x070A#define IL_DXT_NO_COMP      0x070B#define IL_KEEP_DXTC_DATA   0x070C#define IL_DXTC_DATA_FORMAT 0x070D#define IL_3DC              0x070E#define IL_RXGB             0x070F#define IL_ATI1N            0x0710#define IL_DXT1A            0x0711  // Normally the same as IL_DXT1, except for nVidia Texture Tools.// Environment map definitions#define IL_CUBEMAP_POSITIVEX 0x00000400#define IL_CUBEMAP_NEGATIVEX 0x00000800#define IL_CUBEMAP_POSITIVEY 0x00001000#define IL_CUBEMAP_NEGATIVEY 0x00002000#define IL_CUBEMAP_POSITIVEZ 0x00004000#define IL_CUBEMAP_NEGATIVEZ 0x00008000#define IL_SPHEREMAP         0x00010000// Values#define IL_VERSION_NUM           0x0DE2#define IL_IMAGE_WIDTH           0x0DE4#define IL_IMAGE_HEIGHT          0x0DE5#define IL_IMAGE_DEPTH           0x0DE6#define IL_IMAGE_SIZE_OF_DATA    0x0DE7#define IL_IMAGE_BPP             0x0DE8#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8#define IL_IMAGE_BPP             0x0DE8#define IL_IMAGE_BITS_PER_PIXEL  0x0DE9#define IL_IMAGE_FORMAT          0x0DEA#define IL_IMAGE_TYPE            0x0DEB#define IL_PALETTE_TYPE          0x0DEC#define IL_PALETTE_SIZE          0x0DED#define IL_PALETTE_BPP           0x0DEE#define IL_PALETTE_NUM_COLS      0x0DEF#define IL_PALETTE_BASE_TYPE     0x0DF0#define IL_NUM_FACES             0x0DE1#define IL_NUM_IMAGES            0x0DF1#define IL_NUM_MIPMAPS           0x0DF2#define IL_NUM_LAYERS            0x0DF3#define IL_ACTIVE_IMAGE          0x0DF4#define IL_ACTIVE_MIPMAP         0x0DF5#define IL_ACTIVE_LAYER          0x0DF6#define IL_ACTIVE_FACE           0x0E00#define IL_CUR_IMAGE             0x0DF7#define IL_IMAGE_DURATION        0x0DF8#define IL_IMAGE_PLANESIZE       0x0DF9#define IL_IMAGE_BPC             0x0DFA#define IL_IMAGE_OFFX            0x0DFB#define IL_IMAGE_OFFY            0x0DFC#define IL_IMAGE_CUBEFLAGS       0x0DFD#define IL_IMAGE_ORIGIN          0x0DFE#define IL_IMAGE_CHANNELS        0x0DFF# 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.//// This is from Win32's <windef.h>#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)	#define ILAPIENTRY __stdcall 	#define IL_PACKSTRUCT//#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug 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))#else	#define ILAPIENTRY	#define IL_PACKSTRUCT#endif// This is from Win32's <wingdi.h> and <winnt.h>#if defined(__LCC__)	#define ILAPI __stdcall#elif defined(_WIN32) //changed 20031221 to fix bug 840421	#ifdef IL_STATIC_LIB		#define ILAPI	#else		#ifdef _IL_BUILD_LIBRARY			#define ILAPI __declspec(dllexport)		#else			#define ILAPI __declspec(dllimport)		#endif	#endif#elif __APPLE__	#define ILAPI extern#else	#define ILAPI#endif#define IL_SEEK_SET	0#define IL_SEEK_CUR	1#define IL_SEEK_END	2#define IL_EOF		-1// Callback functions for file readingtypedef void* ILHANDLE;typedef void      (ILAPIENTRY *fCloseRProc)(ILHANDLE);typedef ILboolean (ILAPIENTRY *fEofProc)   (ILHANDLE);typedef ILint     (ILAPIENTRY *fGetcProc)  (ILHANDLE);typedef ILHANDLE  (ILAPIENTRY *fOpenRProc) (ILconst_string);typedef ILint     (ILAPIENTRY *fReadProc)  (void*, ILuint, ILuint, ILHANDLE);typedef ILint     (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint);typedef ILint     (ILAPIENTRY *fTellRProc) (ILHANDLE);// Callback functions for file writingtypedef void     (ILAPIENTRY *fCloseWProc)(ILHANDLE);typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string);typedef ILint    (ILAPIENTRY *fPutcProc)  (ILubyte, ILHANDLE);typedef ILint    (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint);typedef ILint    (ILAPIENTRY *fTellWProc) (ILHANDLE);typedef ILint    (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE);// Callback functions for allocation and deallocationtypedef void* (ILAPIENTRY *mAlloc)(const ILsizei);typedef void  (ILAPIENTRY *mFree) (const void* CONST_RESTRICT);// Registered format procedurestypedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string);typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string);// ImageLib FunctionsILAPI ILboolean ILAPIENTRY ilActiveFace(ILuint Number);ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number);ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number);ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number);ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName);ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile);ILAPI void		ILAPIENTRY ilBindImage(ILuint Image);ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth);ILAPI ILboolean ILAPIENTRY ilClampNTSC(void);ILAPI void		ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);ILAPI ILboolean ILAPIENTRY ilClearImage(void);ILAPI ILuint    ILAPIENTRY ilCloneCurImage(void);ILAPI ILubyte*	ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize);ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode);ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType);ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat);ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src);ILAPI ILuint    ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);ILAPI ILuint    ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num);ILAPI ILboolean ILAPIENTRY ilDefaultImage(void);ILAPI void		ILAPIENTRY ilDeleteImage(const ILuint Num);ILAPI void      ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images);ILAPI ILenum	ILAPIENTRY ilDetermineType(ILconst_string FileName);ILAPI ILenum	ILAPIENTRY ilDetermineTypeF(ILHANDLE File);ILAPI ILenum	ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size);ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode);ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage(void);ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface(void);ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode);ILAPI void		ILAPIENTRY ilFlipSurfaceDxtcData(void);ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode);ILAPI void	    ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images);ILAPI ILuint	ILAPIENTRY ilGenImage(void);ILAPI ILubyte*  ILAPIENTRY ilGetAlpha(ILenum Type);ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode);ILAPI void      ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param);ILAPI ILubyte*  ILAPIENTRY ilGetData(void);ILAPI ILuint    ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, ILenum DXTCFormat);ILAPI ILenum    ILAPIENTRY ilGetError(void);ILAPI ILint     ILAPIENTRY ilGetInteger(ILenum Mode);ILAPI void      ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param);ILAPI ILuint    ILAPIENTRY ilGetLumpPos(void);ILAPI ILubyte*  ILAPIENTRY ilGetPalette(void);ILAPI ILconst_string  ILAPIENTRY ilGetString(ILenum StringName);ILAPI void      ILAPIENTRY ilHint(ILenum Target, ILenum Mode);ILAPI ILboolean	ILAPIENTRY ilInvertSurfaceDxtcDataAlpha(void);ILAPI void      ILAPIENTRY ilInit(void);ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format);ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode);ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode);ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image);ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName);ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File);ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size);ILAPI void      ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName);ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File);ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName);ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size);ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName);ILAPI void      ILAPIENTRY ilModAlpha(ILdouble AlphaValue);ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode);ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord);ILAPI void      ILAPIENTRY ilPopAttrib(void);ILAPI void      ILAPIENTRY ilPushAttrib(ILuint Bits);ILAPI void      ILAPIENTRY ilRegisterFormat(ILenum Format);ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load);ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num);ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num);ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num);ILAPI void      ILAPIENTRY ilRegisterOrigin(ILenum Origin);ILAPI void      ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type);ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save);ILAPI void      ILAPIENTRY ilRegisterType(ILenum Type);ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext);ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext);ILAPI void      ILAPIENTRY ilResetMemory(void); // DeprecatedILAPI void      ILAPIENTRY ilResetRead(void);ILAPI void      ILAPIENTRY ilResetWrite(void);ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName);ILAPI ILuint    ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File);ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName);ILAPI ILuint    ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size);ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName);ILAPI ILboolean ILAPIENTRY ilSetAlpha( ILdouble AlphaValue );ILAPI ILboolean ILAPIENTRY ilSetData(void *Data);ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration);ILAPI void      ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param);ILAPI void      ILAPIENTRY ilSetMemory(mAlloc, mFree);ILAPI void      ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);ILAPI void      ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc);ILAPI void      ILAPIENTRY ilSetString(ILenum Mode, const char *String);ILAPI void      ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc);ILAPI void      ILAPIENTRY ilShutDown(void);ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format);ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data);ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte* data);ILAPI ILenum    ILAPIENTRY ilTypeFromExt(ILconst_string FileName);ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode);ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);ILAPI ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName);// For all those weirdos that spell "colour" without the 'u'.#define ilClearColor	ilClearColour#define ilKeyColor      ilKeyColour#define imemclear(x,y) memset(x,0,y);#ifdef __cplusplus}#endif#endif // __IL_H__#endif // __il_h__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?