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