source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/demos/Standalone/Hierarchical Systems Demo [OpenGL]/RESOURCES/include/IL/devil_internal_exports.h @ 3255

Revision 3255, 5.1 KB checked in by szirmay, 15 years ago (diff)
Line 
1//-----------------------------------------------------------------------------
2//
3// ImageLib Sources
4// Copyright (C) 2000-2002 by Denton Woods
5// Last modified: 02/19/2002 <--Y2K Compliant! =]
6//
7// Filename: IL/devil_internal_exports.h
8//
9// Description: Internal stuff for DevIL (IL, ILU and ILUT)
10//
11//-----------------------------------------------------------------------------
12
13#ifndef IL_EXPORTS_H
14#define IL_EXPORTS_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define IL_MAX(a,b) (((a) > (b)) ? (a) : (b))
21#define IL_MIN(a,b) (((a) < (b)) ? (a) : (b))
22
23
24// Basic Palette struct
25typedef struct ILpal
26{
27        ILubyte *Palette;               // the image palette (if any)
28        ILuint  PalSize;                // size of the palette (in bytes)
29        ILenum  PalType;                // the palette types below (0x0500 range)
30} ILpal;
31
32
33// The Fundamental Image struct
34typedef struct ILimage
35{
36        ILuint  Width;                          // the image's width
37        ILuint  Height;                         // the image's height
38        ILuint  Depth;                          // the image's depth
39        ILubyte Bpp;                            // bytes per pixel (now number of channels)
40        ILubyte Bpc;                            // bytes per channel
41        ILuint  Bps;                            // bytes per scanline (components for IL)
42        ILubyte *Data;                          // the image data
43        ILuint  SizeOfData;                     // the total size of the data (in bytes)
44        ILuint  SizeOfPlane;            // SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes)
45        ILenum  Format;                         // image format (in IL enum style)
46        ILenum  Type;                           // image type (in IL enum style)
47        ILenum  Origin;                         // origin of the image
48        ILpal   Pal;                            // palette details
49        ILuint  Duration;                       // length of the time to display this "frame"
50        ILenum  CubeFlags;                      // cube map flags for sides present in chain
51        struct  ILimage *Mipmaps;       // mipmapped versions of this image terminated by a NULL - usu. NULL
52        struct  ILimage *Next;          // next image in the chain - usu. NULL
53        struct  ILimage *Layers;        // subsequent layers in the chain - usu. NULL
54        ILuint  NumNext;                        // number of images following this one (0 when not parent)
55        ILuint  NumMips;                        // number of mipmaps (0 when not parent)
56        ILuint  NumLayers;                      // number of layers (0 when not parent)
57        ILuint  *AnimList;                      // animation list
58        ILuint  AnimSize;                       // animation list size
59        ILvoid  *Profile;                       // colour profile
60        ILuint  ProfileSize;            // colour profile size
61        ILuint  OffX, OffY;                     // offset of the image
62        ILubyte *DxtcData;                      // compressed data
63        ILenum  DxtcFormat;                     // compressed data format
64        ILuint  DxtcSize;                       // compressed data size
65} ILimage;
66
67
68// Memory functions
69ILAPI ILvoid*   ILAPIENTRY ialloc(ILuint Size);
70ILAPI ILvoid    ILAPIENTRY ifree(ILvoid *Ptr);
71ILAPI ILvoid*   ILAPIENTRY icalloc(ILuint Size, ILuint Num);
72
73
74
75// Internal library functions in IL
76ILAPI ILimage*          ILAPIENTRY ilGetCurImage(ILvoid);
77ILAPI ILvoid            ILAPIENTRY ilSetCurImage(ILimage *Image);
78ILAPI ILvoid            ILAPIENTRY ilSetError(ILenum Error);
79ILAPI ILvoid            ILAPIENTRY ilSetPal(ILpal *Pal);
80
81//
82// Utility functions
83//
84ILAPI ILubyte   ILAPIENTRY ilGetBppFormat(ILenum Format);
85ILAPI ILubyte   ILAPIENTRY ilGetBppPal(ILenum PalType);
86ILAPI ILubyte   ILAPIENTRY ilGetBppType(ILenum Type);
87ILAPI ILenum    ILAPIENTRY ilGetTypeBpc(ILubyte Bpc);
88ILAPI ILenum    ILAPIENTRY ilGetPalBaseType(ILenum PalType);
89ILAPI ILuint    ILAPIENTRY ilNextPower2(ILuint Num);
90ILAPI ILenum    ILAPIENTRY ilTypeFromExt(const ILstring FileName);
91ILAPI ILvoid ILAPIENTRY ilReplaceCurImage(ILimage *Image);
92
93//
94// Image functions
95//
96ILAPI ILvoid    ILAPIENTRY      iBindImageTemp(ILvoid);
97ILAPI ILboolean ILAPIENTRY      ilClearImage_(ILimage *Image);
98ILAPI ILvoid    ILAPIENTRY      ilCloseImage(ILimage *Image);
99ILAPI ILvoid    ILAPIENTRY      ilClosePal(ILpal *Palette);
100ILAPI ILpal*    ILAPIENTRY      iCopyPal(ILvoid);
101ILAPI ILboolean ILAPIENTRY      ilCopyImageAttr(ILimage *Dest, ILimage *Src);
102ILAPI ILimage*  ILAPIENTRY      ilCopyImage_(ILimage *Src);
103ILAPI ILvoid    ILAPIENTRY      ilGetClear(ILvoid *Colours, ILenum Format, ILenum Type);
104ILAPI ILuint    ILAPIENTRY      ilGetCurName(ILvoid);
105ILAPI ILboolean ILAPIENTRY      ilIsValidPal(ILpal *Palette);
106ILAPI ILimage*  ILAPIENTRY      ilNewImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
107ILAPI ILboolean ILAPIENTRY      ilResizeImage(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
108ILAPI ILboolean ILAPIENTRY      ilTexImage_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data);
109ILAPI ILboolean ILAPIENTRY      ilTexSubImage_(ILimage *Image, ILvoid *Data);
110ILAPI ILvoid*   ILAPIENTRY      ilConvertBuffer(ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILvoid *Buffer);
111ILAPI ILimage*  ILAPIENTRY      iConvertImage(ILimage *Image, ILenum DestFormat, ILenum DestType);
112ILAPI ILpal*    ILAPIENTRY      iConvertPal(ILpal *Pal, ILenum DestFormat);
113ILAPI ILubyte*  ILAPIENTRY      iGetFlipped(ILimage *Image);
114
115
116// Internal library functions in ILU
117ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle);
118ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
119ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth);
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif//IL_EXPORTS_H
Note: See TracBrowser for help on using the repository browser.