source: OGRE/trunk/ogre_dependencies/Dependencies/include/il/devil_internal_exports.h @ 692

Revision 692, 5.9 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

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