- Main Page
- Data Structures
- Files

- File List
- Globals

# E:/DevIL/include/IL/il_wrap.h

    00001 #ifndef WRAPPER_H
    00002 #define WRAPPER_H
    00003
    00004 /*#include <il/il.h>
    00005 #include <il/ilu.h>*/
    00006 #include <IL/ilut.h>  // Probably only have to #include this one
    00007
    00008 #ifdef _MSC_VER
    00009         #ifndef _IL_WRAP_BUILD_LIB
    00010                 #pragma comment(lib, "il_wrap.lib")
    00011         #endif
    00012 #endif
    00013
    00014 class ilImage
    00015 {
    00016 public:
    00017                                 ilImage();
    00018                                 ilImage(char *);
    00019                                 ilImage(const ilImage &);
    00020         virtual         ~ilImage();
    00021
    00022         ILboolean       Load(char *);
    00023         ILboolean       Load(char *, ILenum);
    00024         ILboolean       Save(char *);
    00025         ILboolean       Save(char *, ILenum);
    00026
    00027
    00028         // ImageLib functions
    00029         ILboolean       ActiveImage(ILuint);
    00030         ILboolean       ActiveLayer(ILuint);
    00031         ILboolean       ActiveMipmap(ILuint);
    00032         ILboolean       Clear(void);
    00033         ILvoid          ClearColour(ILclampf, ILclampf, ILclampf, ILclampf);
    00034         ILboolean       Convert(ILenum);
    00035         ILboolean       Copy(ILuint);
    00036         ILboolean       Default(void);
    00037         ILboolean       Flip(void);
    00038         ILboolean       SwapColours(void);
    00039         ILboolean       Resize(ILuint, ILuint, ILuint);
    00040         ILboolean       TexImage(ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, ILvoid*);
    00041
    00042
    00043         // Image handling
    00044         ILvoid          Bind(void) const;
    00045         ILvoid          Bind(ILuint);
    00046         ILvoid          Close(void) { this->Delete(); }
    00047         ILvoid          Delete(void);
    00048         ILvoid          iGenBind();
    00049         ILenum          PaletteAlphaIndex();
    00050
    00051         // Image characteristics
    00052         ILuint          Width(void);
    00053         ILuint          Height(void);
    00054         ILuint          Depth(void);
    00055         ILubyte         Bpp(void);
    00056         ILubyte         Bitpp(void);
    00057         ILenum          PaletteType(void);
    00058         ILenum          Format(void);
    00059         ILenum          Type(void);
    00060         ILuint          NumImages(void);
    00061         ILuint          NumMipmaps(void);
    00062         ILuint          GetId(void) const;
    00063         ILenum      GetOrigin(void);
    00064         ILubyte         *GetData(void);
    00065         ILubyte         *GetPalette(void);
    00066
    00067
    00068         // Rendering
    00069         ILuint          BindImage(void);
    00070         ILuint          BindImage(ILenum);
    00071
    00072
    00073         // Operators
    00074         ilImage&        operator = (ILuint);
    00075         ilImage&        operator = (const ilImage &);
    00076
    00077
    00078 protected:
    00079         ILuint          Id;
    00080
    00081 private:
    00082         ILvoid          iStartUp();
    00083
    00084
    00085 };
    00086
    00087
    00088 class ilFilters
    00089 {
    00090 public:
    00091         static ILboolean        Alienify(ilImage &);
    00092         static ILboolean        BlurAvg(ilImage &, ILuint Iter);
    00093         static ILboolean        BlurGaussian(ilImage &, ILuint Iter);
    00094         static ILboolean        Contrast(ilImage &, ILfloat Contrast);
    00095         static ILboolean        EdgeDetectE(ilImage &);
    00096         static ILboolean        EdgeDetectP(ilImage &);
    00097         static ILboolean        EdgeDetectS(ilImage &);
    00098         static ILboolean        Emboss(ilImage &);
    00099         static ILboolean        Gamma(ilImage &, ILfloat Gamma);
    00100         static ILboolean        Negative(ilImage &);
    00101         static ILboolean        Noisify(ilImage &, ILubyte Factor);
    00102         static ILboolean        Pixelize(ilImage &, ILuint PixSize);
    00103         static ILboolean        Saturate(ilImage &, ILfloat Saturation);
    00104         static ILboolean        Saturate(ilImage &, ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
    00105         static ILboolean        ScaleColours(ilImage &, ILfloat r, ILfloat g, ILfloat b);
    00106         static ILboolean        Sharpen(ilImage &, ILfloat Factor, ILuint Iter);
    00107 };
    00108
    00109
    00110 #ifdef ILUT_USE_OPENGL
    00111 class ilOgl
    00112 {
    00113 public:
    00114         static ILvoid           Init(void);
    00115         static GLuint           BindTex(ilImage &);
    00116         static ILboolean        Upload(ilImage &, ILuint);
    00117         static GLuint           Mipmap(ilImage &);
    00118         static ILboolean        Screen(void);
    00119         static ILboolean        Screenie(void);
    00120 };
    00121 #endif//ILUT_USE_OPENGL
    00122
    00123
    00124 #ifdef ILUT_USE_ALLEGRO
    00125 class ilAlleg
    00126 {
    00127 public:
    00128         static ILvoid   Init(void);
    00129         static BITMAP   *Convert(ilImage &);
    00130 };
    00131 #endif//ILUT_USE_ALLEGRO
    00132
    00133
    00134 #ifdef ILUT_USE_WIN32
    00135 class ilWin32
    00136 {
    00137 public:
    00138         static ILvoid           Init(void);
    00139         static HBITMAP          Convert(ilImage &);
    00140         static ILboolean        GetClipboard(ilImage &);
    00141         static ILvoid           GetInfo(ilImage &, BITMAPINFO *Info);
    00142         static ILubyte          *GetPadData(ilImage &);
    00143         static HPALETTE         GetPal(ilImage &);
    00144         static ILboolean        GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType);
    00145         static ILboolean        GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType, ILenum Type);
    00146         static ILboolean        SetClipboard(ilImage &);
    00147 };
    00148 #endif//ILUT_USE_WIN32
    00149
    00150
    00151 class ilValidate
    00152 {
    00153 public:
    00154         static ILboolean        Valid(ILenum, char *);
    00155         static ILboolean        Valid(ILenum, FILE *);
    00156         static ILboolean        Valid(ILenum, ILvoid *, ILuint);
    00157
    00158 protected:
    00159
    00160 private:
    00161
    00162 };
    00163
    00164
    00165 class ilState
    00166 {
    00167 public:
    00168         static ILboolean                Disable(ILenum);
    00169         static ILboolean                Enable(ILenum);
    00170         static ILvoid                   Get(ILenum, ILboolean &);
    00171         static ILvoid                   Get(ILenum, ILint &);
    00172         static ILboolean                GetBool(ILenum);
    00173         static ILint                    GetInt(ILenum);
    00174         static const char               *GetString(ILenum);
    00175         static ILboolean                IsDisabled(ILenum);
    00176         static ILboolean                IsEnabled(ILenum);
    00177         static ILboolean                Origin(ILenum);
    00178         static ILvoid                   Pop(void);
    00179         static ILvoid                   Push(ILuint);
    00180
    00181
    00182 protected:
    00183
    00184 private:
    00185
    00186 };
    00187
    00188
    00189 class ilError
    00190 {
    00191 public:
    00192         static ILvoid           Check(ILvoid (*Callback)(const char*));
    00193         static ILvoid           Check(ILvoid (*Callback)(ILenum));
    00194         static ILenum           Get(void);
    00195         static const char       *String(void);
    00196         static const char       *String(ILenum);
    00197
    00198 protected:
    00199
    00200 private:
    00201
    00202 };
    00203
    00204
    00205 #endif//WRAPPER_H