- Main Page
- Data Structures
- Files

# /home/dwoods/DevIL/include/IL/devil_internal_exports.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2009 by Denton Woods
    00005 // Last modified: 01/06/2009
    00006 //
    00007 // Filename: IL/devil_internal_exports.h
    00008 //
    00009 // Description: Internal stuff for DevIL (IL, ILU and ILUT)
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013 #ifndef IL_EXPORTS_H
    00014 #define IL_EXPORTS_H
    00015
    00016 #include "IL/il.h"
    00017
    00018 #ifdef DEBUG
    00019         #include <assert.h>
    00020 #else
    00021         #define assert(x)
    00022 #endif
    00023
    00024 //#ifndef NOINLINE
    00025 #ifndef INLINE
    00026 #if defined(__GNUC__)
    00027         #define INLINE extern inline
    00028 #elif defined(_MSC_VER) //@TODO: Get this working in MSVC++.
    00029                                                 //  http://www.greenend.org.uk/rjk/2003/03/inline.html
    00030         #define NOINLINE
    00031         //#define INLINE
    00032         /*#ifndef _WIN64  // Cannot use inline assembly in x64 target platform.
    00033                 #define USE_WIN32_ASM
    00034         #endif//_WIN64*/
    00035         #define INLINE __inline
    00036 #else
    00037         #define INLINE inline
    00038 #endif
    00039 #endif
    00040 //#else
    00041 //#define INLINE
    00042 //#endif //NOINLINE
    00043
    00044 #ifdef __cplusplus
    00045 extern "C" {
    00046 #endif
    00047
    00048 #define IL_MAX(a,b) (((a) > (b)) ? (a) : (b))
    00049 #define IL_MIN(a,b) (((a) < (b)) ? (a) : (b))
    00050
    00051
    00053 typedef struct ILpal
    00054 {
    00055         ILubyte* Palette;
    00056         ILuint   PalSize;
    00057         ILenum   PalType;
    00058 } ILpal;
    00059
    00060
    00062
    00063 typedef struct ILimage
    00064 {
    00065         ILuint          Width;
    00066         ILuint          Height;
    00067         ILuint          Depth;
    00068         ILubyte         Bpp;
    00069         ILubyte         Bpc;
    00070         ILuint          Bps;
    00071         ILubyte*        Data;
    00072         ILuint          SizeOfData;
    00073         ILuint          SizeOfPlane;
    00074         ILenum          Format;
    00075         ILenum          Type;
    00076         ILenum          Origin;
    00077         ILpal           Pal;
    00078         ILuint          Duration;
    00079         ILenum          CubeFlags;
    00080         struct ILimage* Mipmaps;
    00081         struct ILimage* Next;
    00082         struct ILimage* Faces;
    00083         struct ILimage* Layers;
    00084         ILuint*         AnimList;
    00085         ILuint          AnimSize;
    00086         void*           Profile;
    00087         ILuint          ProfileSize;
    00088         ILuint          OffX;
    00089         ILuint                  OffY;
    00090         ILubyte*        DxtcData;
    00091         ILenum          DxtcFormat;
    00092         ILuint          DxtcSize;
    00093 } ILimage;
    00094
    00095
    00096 // Memory functions
    00097 ILAPI void* ILAPIENTRY ialloc(const ILsizei Size);
    00098 ILAPI void  ILAPIENTRY ifree(const void *Ptr);
    00099 ILAPI void* ILAPIENTRY icalloc(const ILsizei Size, const ILsizei Num);
    00100 #ifdef ALTIVEC_GCC
    00101 ILAPI void* ILAPIENTRY ivec_align_buffer(void *buffer, const ILuint size);
    00102 #endif
    00103
    00104 // Internal library functions in IL
    00105 ILAPI ILimage* ILAPIENTRY ilGetCurImage(void);
    00106 ILAPI void     ILAPIENTRY ilSetCurImage(ILimage *Image);
    00107 ILAPI void     ILAPIENTRY ilSetError(ILenum Error);
    00108 ILAPI void     ILAPIENTRY ilSetPal(ILpal *Pal);
    00109
    00110 //
    00111 // Utility functions
    00112 //
    00113 ILAPI ILubyte ILAPIENTRY ilGetBppFormat(ILenum Format);
    00114 ILAPI ILenum  ILAPIENTRY ilGetFormatBpp(ILubyte Bpp);
    00115 ILAPI ILubyte ILAPIENTRY ilGetBpcType(ILenum Type);
    00116 ILAPI ILenum  ILAPIENTRY ilGetTypeBpc(ILubyte Bpc);
    00117 ILAPI ILubyte ILAPIENTRY ilGetBppPal(ILenum PalType);
    00118 ILAPI ILenum  ILAPIENTRY ilGetPalBaseType(ILenum PalType);
    00119 ILAPI ILuint  ILAPIENTRY ilNextPower2(ILuint Num);
    00120 ILAPI ILenum  ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
    00121 ILAPI void    ILAPIENTRY ilReplaceCurImage(ILimage *Image);
    00122 ILAPI void    ILAPIENTRY iMemSwap(ILubyte *, ILubyte *, const ILuint);
    00123
    00124 //
    00125 // Image functions
    00126 //
    00127 ILAPI void          ILAPIENTRY iBindImageTemp  (void);
    00128 ILAPI ILboolean ILAPIENTRY ilClearImage_   (ILimage *Image);
    00129 ILAPI void      ILAPIENTRY ilCloseImage    (ILimage *Image);
    00130 ILAPI void      ILAPIENTRY ilClosePal      (ILpal *Palette);
    00131 ILAPI ILpal*    ILAPIENTRY iCopyPal        (void);
    00132 ILAPI ILboolean ILAPIENTRY ilCopyImageAttr (ILimage *Dest, ILimage *Src);
    00133 ILAPI ILimage*  ILAPIENTRY ilCopyImage_    (ILimage *Src);
    00134 ILAPI void      ILAPIENTRY ilGetClear      (void *Colours, ILenum Format, ILenum Type);
    00135 ILAPI ILuint    ILAPIENTRY ilGetCurName    (void);
    00136 ILAPI ILboolean ILAPIENTRY ilIsValidPal    (ILpal *Palette);
    00137 ILAPI ILimage*  ILAPIENTRY ilNewImage      (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
    00138 ILAPI ILimage*  ILAPIENTRY ilNewImageFull  (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
    00139 ILAPI ILboolean ILAPIENTRY ilInitImage     (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
    00140 ILAPI ILboolean ILAPIENTRY ilResizeImage   (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
    00141 ILAPI ILboolean ILAPIENTRY ilTexImage_     (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
    00142 ILAPI ILboolean ILAPIENTRY ilTexSubImage_  (ILimage *Image, void *Data);
    00143 ILAPI void*     ILAPIENTRY ilConvertBuffer (ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILpal *SrcPal, void *Buffer);
    00144 ILAPI ILimage*  ILAPIENTRY iConvertImage   (ILimage *Image, ILenum DestFormat, ILenum DestType);
    00145 ILAPI ILpal*    ILAPIENTRY iConvertPal     (ILpal *Pal, ILenum DestFormat);
    00146 ILAPI ILubyte*  ILAPIENTRY iGetFlipped     (ILimage *Image);
    00147 ILAPI ILboolean ILAPIENTRY iMirror();
    00148 ILAPI void      ILAPIENTRY iFlipBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num);
    00149 ILubyte*                                   iFlipNewBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num);
    00150 ILAPI void      ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param);
    00151
    00152 // Internal library functions in ILU
    00153 ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle);
    00154 ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
    00155 ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth);
    00156
    00157 #ifdef __cplusplus
    00158 }
    00159 #endif
    00160
    00161 #endif//IL_EXPORTS_H