00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __ilut_h_
00015 #ifndef __ILUT_H__
00016
00017 #define __ilut_h_
00018 #define __ILUT_H__
00019
00020 #include <IL/il.h>
00021 #include <IL/ilu.h>
00022
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #define ILUT_VERSION_1_6_7 1
00048 #define ILUT_VERSION 167
00049
00050
00051
00052 #define ILUT_OPENGL_BIT 0x00000001
00053 #define ILUT_D3D_BIT 0x00000002
00054 #define ILUT_ALL_ATTRIB_BITS 0x000FFFFF
00055
00056
00057
00058 #define ILUT_INVALID_ENUM 0x0501
00059 #define ILUT_OUT_OF_MEMORY 0x0502
00060 #define ILUT_INVALID_VALUE 0x0505
00061 #define ILUT_ILLEGAL_OPERATION 0x0506
00062 #define ILUT_INVALID_PARAM 0x0509
00063 #define ILUT_COULD_NOT_OPEN_FILE 0x050A
00064 #define ILUT_STACK_OVERFLOW 0x050E
00065 #define ILUT_STACK_UNDERFLOW 0x050F
00066 #define ILUT_BAD_DIMENSIONS 0x0511
00067 #define ILUT_NOT_SUPPORTED 0x0550
00068
00069
00070
00071 #define ILUT_PALETTE_MODE 0x0600
00072 #define ILUT_OPENGL_CONV 0x0610
00073 #define ILUT_D3D_MIPLEVELS 0x0620
00074 #define ILUT_MAXTEX_WIDTH 0x0630
00075 #define ILUT_MAXTEX_HEIGHT 0x0631
00076 #define ILUT_MAXTEX_DEPTH 0x0632
00077 #define ILUT_GL_USE_S3TC 0x0634
00078 #define ILUT_D3D_USE_DXTC 0x0634
00079 #define ILUT_GL_GEN_S3TC 0x0635
00080 #define ILUT_D3D_GEN_DXTC 0x0635
00081 #define ILUT_S3TC_FORMAT 0x0705
00082 #define ILUT_DXTC_FORMAT 0x0705
00083 #define ILUT_D3D_POOL 0x0706
00084 #define ILUT_D3D_ALPHA_KEY_COLOR 0x0707
00085 #define ILUT_D3D_ALPHA_KEY_COLOUR 0x0707
00086
00087
00088
00089
00090 #define ILUT_GL_AUTODETECT_TEXTURE_TARGET 0x0807
00091
00092
00093
00094 #define ILUT_VERSION_NUM IL_VERSION_NUM
00095 #define ILUT_VENDOR IL_VENDOR
00096
00097
00098
00099 ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode);
00100 ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode);
00101 ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode);
00102 ILAPI ILvoid ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Param);
00103 ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode);
00104 ILAPI ILvoid ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param);
00105 ILAPI const ILstring ILAPIENTRY ilutGetString(ILenum StringName);
00106 ILAPI ILvoid ILAPIENTRY ilutInit(ILvoid);
00107 ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode);
00108 ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode);
00109 ILAPI ILvoid ILAPIENTRY ilutPopAttrib(ILvoid);
00110 ILAPI ILvoid ILAPIENTRY ilutPushAttrib(ILuint Bits);
00111 ILAPI ILvoid ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param);
00112
00113
00114
00115 #define ILUT_OPENGL 0
00116 #define ILUT_ALLEGRO 1
00117 #define ILUT_WIN32 2
00118 #define ILUT_DIRECT3D8 3
00119 #define ILUT_DIRECT3D9 4
00120
00121
00122 ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer);
00123
00124
00125 #ifdef DJGPP
00126 #define ILUT_USE_ALLEGRO
00127 #elif _WIN32_WCE
00128 #define ILUT_USE_WIN32
00129 #elif _WIN32
00130
00131 #include "config.h"
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144 #elif BEOS // Don't know the #define
00145 #define ILUT_USE_BEOS
00146 #define ILUT_USE_OPENGL
00147 #elif MACOSX
00148 #define ILUT_USE_OPENGL
00149 #else
00150
00151
00152
00153
00154 #include "config.h"
00155 #endif
00156
00157
00158 #ifdef ILUT_USE_OPENGL
00159 #if defined(_MSC_VER) || defined(_WIN32)
00160
00161 #include <windows.h>
00162 #endif//_MSC_VER
00163
00164 #ifdef __APPLE__
00165 #include <OpenGL/gl.h>
00166 #include <OpenGL/glu.h>
00167 #else
00168 #include <GL/gl.h>
00169 #include <GL/glu.h>
00170 #endif//__APPLE__
00171
00172 ILAPI GLuint ILAPIENTRY ilutGLBindTexImage();
00173 ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(ILvoid);
00174 ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(ILvoid);
00175 ILAPI GLuint ILAPIENTRY ilutGLLoadImage(const ILstring FileName);
00176 ILAPI ILboolean ILAPIENTRY ilutGLScreen(ILvoid);
00177 ILAPI ILboolean ILAPIENTRY ilutGLScreenie(ILvoid);
00178 ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(const ILstring FileName, GLuint TexID);
00179 ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID);
00180 ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level);
00181
00182 #endif//ILUT_USE_OPENGL
00183
00184
00185
00186 #ifdef ILUT_USE_ALLEGRO
00187 #include <allegro.h>
00188 ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(const ILstring FileName);
00189 ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal);
00190 #endif//ILUT_USE_ALLEGRO
00191
00192
00193
00194 #ifdef ILUT_USE_SDL
00195 #include <SDL.h>
00196 ILAPI SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigned int flags);
00197 ILAPI SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(const ILstring FileName);
00198 ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(SDL_Surface *Bitmap);
00199 #endif//ILUT_USE_SDL
00200
00201
00202
00203 #ifdef ILUT_USE_BEOS
00204 ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(ILvoid);
00205 #endif//ILUT_USE_BEOS
00206
00207
00208
00209 #ifdef ILUT_USE_WIN32
00210 #ifdef _WIN32
00211
00212 #include <windows.h>
00213 ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC);
00214 ILAPI ILvoid ILAPIENTRY ilutFreePaddedData(ILubyte *Data);
00215 ILAPI ILvoid ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info);
00216 ILAPI HPALETTE ILAPIENTRY ilutGetHPal(ILvoid);
00217 ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(ILvoid);
00218 ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(ILvoid);
00219 ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint ID, const ILstring ResourceType, ILenum Type);
00220 ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap);
00221 ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal);
00222 ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(ILvoid);
00223 ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(const ILstring FileName, HDC hDC);
00224 ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(const ILstring Url);
00225 ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC);
00226 ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(const ILstring FileName, HBITMAP Bitmap);
00227
00228 #endif//_WIN32
00229 #endif//ILUT_USE_WIN32
00230
00231
00232 #ifdef ILUT_USE_DIRECTX9
00233 #ifdef _WIN32
00234
00235
00236 ILAPI struct IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture(struct IDirect3DDevice9 *Device);
00237 ILAPI struct IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture(struct IDirect3DDevice9 *Device);
00238 ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(struct IDirect3DDevice9 *Device, char *FileName, struct IDirect3DTexture9 **Texture);
00239 ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(struct IDirect3DDevice9 *Device, char *FileName, struct IDirect3DVolumeTexture9 **Texture);
00240 ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(struct IDirect3DDevice9 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DTexture9 **Texture);
00241 ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(struct IDirect3DDevice9 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DVolumeTexture9 **Texture);
00242 ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DTexture9 **Texture);
00243 ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DVolumeTexture9 **Texture);
00244
00245 ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture9 **Texture);
00246 ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture9 **Texture);
00247
00248 ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(struct IDirect3DDevice9 *Device, struct IDirect3DSurface9 *Surface);
00249 #endif//_WIN32
00250 #endif//ILUT_USE_DIRECTX9
00251
00252
00253 #ifdef ILUT_USE_DIRECTX8
00254 #ifdef _WIN32
00255
00256
00257
00258
00259 ILAPI struct IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(struct IDirect3DDevice8 *Device);
00260 ILAPI struct IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(struct IDirect3DDevice8 *Device);
00261 ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DTexture8 **Texture);
00262 ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DVolumeTexture8 **Texture);
00263 ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(struct IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DTexture8 **Texture);
00264 ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(struct IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, struct IDirect3DVolumeTexture8 **Texture);
00265 ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DTexture8 **Texture);
00266 ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DVolumeTexture8 **Texture);
00267
00268 ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture8 **Texture);
00269 ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture8 **Texture);
00270
00271 ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(struct IDirect3DDevice8 *Device, struct IDirect3DSurface8 *Surface);
00272 #endif//_WIN32
00273 #endif//ILUT_USE_DIRECTX8
00274
00275
00276 #ifdef __cplusplus
00277 }
00278 #endif
00279
00280 #endif // __ILUT_H__
00281 #endif // __ilut_h_