All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PVRTextureDefines.h
Go to the documentation of this file.
1 /*!***********************************************************************
2 
3  @file PVRTextureDefines.h
4  @copyright Copyright (c) Imagination Technologies Limited.
5  @brief Method, template and type defines for PVRTexture.
6 
7 *************************************************************************/
8 
9 #ifndef _PVRTEXTURE_DEFINES_H
10 #define _PVRTEXTURE_DEFINES_H
11 
12 //To use the PVRTexLib .dll on Windows, you need to define _WINDLL_IMPORT
13 #ifndef PVR_DLL
14 #if defined(_WINDLL_EXPORT)
15 #define PVR_DLL __declspec(dllexport)
16 //Forward declaration of various classes/structs used by this library. This exports their interfaces for DLLs.
17 struct PVR_DLL PVRTextureHeaderV3;
18 struct PVR_DLL MetaDataBlock;
19 template <typename KeyType, typename DataType>
20 class PVR_DLL CPVRTMap;
21 template<typename T>
22 class PVR_DLL CPVRTArray;
23 class PVR_DLL CPVRTString;
24 #elif defined(_WINDLL_IMPORT)
25 #define PVR_DLL __declspec(dllimport)
26 //Forward declaration of various classes/structs used by this library. This imports their interfaces for DLLs.
27 struct PVR_DLL PVRTextureHeaderV3;
28 struct PVR_DLL MetaDataBlock;
29 template <typename KeyType, typename DataType>
30 class PVR_DLL CPVRTMap;
31 template<typename T>
32 class PVR_DLL CPVRTArray;
33 class PVR_DLL CPVRTString;
34 #else
35 
36 /*!***********************************************************************
37  @def PVR_DLL
38  @brief Required to use PVRTexLib.dll on Windows.
39 *************************************************************************/
40 #define PVR_DLL
41 #endif
42 #endif
43 
44 #include "PVRTTexture.h"
45 
46 /*!***********************************************************************
47  @namespace pvrtexture
48  @brief PVRTexture namespace. Contains methods and classes for PVRTexLib.
49 *************************************************************************/
50 namespace pvrtexture
51 {
52  // Type defines for standard variable sizes.
53 
54  typedef signed char int8;
55  typedef signed short int16;
56  typedef signed int int32;
57  typedef signed long long int64;
58  typedef unsigned char uint8;
59  typedef unsigned short uint16;
60  typedef unsigned int uint32;
61  typedef unsigned long long uint64;
62 
63  // Texture related constants and enumerations.
64 
65  /*!***********************************************************************
66  @enum ECompressorQuality
67  @brief Quality level to compress the texture with. Currently valid with
68  ETC and PVRTC formats.
69  *************************************************************************/
71  {
78 
84  };
85 
86  /*!***********************************************************************
87  @enum EResizeMode
88  @brief Texture resize mode
89  *************************************************************************/
91  {
96  };
97 
98  /*!***********************************************************************
99  @enum ELegacyApi
100  @brief Legacy API enum.
101  *************************************************************************/
103  {
104  eOGLES=1,
112  };
113 
114  // Useful macros.
115  /*!***************************************************************************
116  @def TEXOFFSET2D
117  @brief 2D texture offset
118  *****************************************************************************/
119  #define TEXOFFSET2D(x,y,width) ( ((x)+(y)*(width)) )
120 
121  /*!***************************************************************************
122  @def TEXOFFSET3D
123  @brief 3D texture offset
124  *****************************************************************************/
125  #define TEXOFFSET3D(x,y,z,width,height) ( ((x)+(y)*(width)+(z)*(width)*(height)) )
126 
127  /*!***************************************************************************
128  @typedef MetaDataMap
129  @brief Useful typedef for generating maps of MetaData blocks.
130  *****************************************************************************/
131  typedef CPVRTMap<uint32, CPVRTMap<uint32,MetaDataBlock> > MetaDataMap;
132 };
133 #endif //_PVRTEXTURE_DEFINES_H