PVRTTexture_8h-source.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  3. <title>PowerVR SDK</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. <table width="100%">
  7. <tr>
  8. <td width="33%">
  9. <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
  10. </td>
  11. <td width="33%">
  12. <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
  13. </td>
  14. <td width="34%">
  15. <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
  16. </td>
  17. </tr>
  18. </table>
  19. <hr>
  20. </head><body>
  21. <!-- Generated by Doxygen 1.3.6 -->
  22. <div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
  23. <h1>PVRTTexture.h</h1><a href="PVRTTexture_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
  24. 00002 <span class="comment"></span>
  25. 00003 <span class="comment"> @File PVRTTexture.h</span>
  26. 00004 <span class="comment"></span>
  27. 00005 <span class="comment"> @Title PVRTTexture</span>
  28. 00006 <span class="comment"></span>
  29. 00007 <span class="comment"> @Version </span>
  30. 00008 <span class="comment"></span>
  31. 00009 <span class="comment"> @Copyright Copyright (C) Imagination Technologies Limited.</span>
  32. 00010 <span class="comment"></span>
  33. 00011 <span class="comment"> @Platform ANSI compatible</span>
  34. 00012 <span class="comment"></span>
  35. 00013 <span class="comment"> @Description Texture loading.</span>
  36. 00014 <span class="comment"></span>
  37. 00015 <span class="comment">******************************************************************************/</span>
  38. 00016 <span class="preprocessor">#ifndef _PVRTTEXTURE_H_</span>
  39. 00017 <span class="preprocessor"></span><span class="preprocessor">#define _PVRTTEXTURE_H_</span>
  40. 00018 <span class="preprocessor"></span>
  41. 00019 <span class="preprocessor">#include "<a class="code" href="PVRTGlobal_8h.html">PVRTGlobal.h</a>"</span>
  42. 00020 <span class="comment">/*!***************************************************************************</span>
  43. 00021 <span class="comment">Macros</span>
  44. 00022 <span class="comment">*****************************************************************************/</span>
  45. 00023
  46. 00024 <span class="comment">/*!***************************************************************************</span>
  47. 00025 <span class="comment">Describes the header of a PVR header-texture</span>
  48. 00026 <span class="comment">*****************************************************************************/</span>
  49. <a name="l00027"></a><a class="code" href="structPVR__Texture__Header.html">00027</a> <span class="keyword">struct </span><a class="code" href="structPVR__Texture__Header.html">PVR_Texture_Header</a>
  50. 00028 {
  51. <a name="l00029"></a><a class="code" href="structPVR__Texture__Header.html#o0">00029</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o0">dwHeaderSize</a>;
  52. <a name="l00030"></a><a class="code" href="structPVR__Texture__Header.html#o1">00030</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o1">dwHeight</a>;
  53. <a name="l00031"></a><a class="code" href="structPVR__Texture__Header.html#o2">00031</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o2">dwWidth</a>;
  54. <a name="l00032"></a><a class="code" href="structPVR__Texture__Header.html#o3">00032</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o3">dwMipMapCount</a>;
  55. <a name="l00033"></a><a class="code" href="structPVR__Texture__Header.html#o4">00033</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o4">dwpfFlags</a>;
  56. <a name="l00034"></a><a class="code" href="structPVR__Texture__Header.html#o5">00034</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o5">dwTextureDataSize</a>;
  57. <a name="l00035"></a><a class="code" href="structPVR__Texture__Header.html#o6">00035</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o6">dwBitCount</a>;
  58. <a name="l00036"></a><a class="code" href="structPVR__Texture__Header.html#o7">00036</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o7">dwRBitMask</a>;
  59. <a name="l00037"></a><a class="code" href="structPVR__Texture__Header.html#o8">00037</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o8">dwGBitMask</a>;
  60. <a name="l00038"></a><a class="code" href="structPVR__Texture__Header.html#o9">00038</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o9">dwBBitMask</a>;
  61. <a name="l00039"></a><a class="code" href="structPVR__Texture__Header.html#o10">00039</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o10">dwAlphaBitMask</a>;
  62. <a name="l00040"></a><a class="code" href="structPVR__Texture__Header.html#o11">00040</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o11">dwPVR</a>;
  63. <a name="l00041"></a><a class="code" href="structPVR__Texture__Header.html#o12">00041</a> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="structPVR__Texture__Header.html#o12">dwNumSurfs</a>;
  64. 00042 } ;
  65. 00043
  66. 00044 <span class="comment">/*****************************************************************************</span>
  67. 00045 <span class="comment">* ENUMS</span>
  68. 00046 <span class="comment">*****************************************************************************/</span>
  69. 00047
  70. <a name="l00048"></a><a class="code" href="PVRTTexture_8h.html#a176">00048</a> <span class="keyword">enum</span> <a class="code" href="PVRTPFXParser_8h.html#a1">PixelType</a>
  71. 00049 {
  72. 00050 <a class="code" href="PVRTTexture_8h.html#a176a20">MGLPT_ARGB_4444</a> = 0x00,
  73. 00051 <a class="code" href="PVRTTexture_8h.html#a176a21">MGLPT_ARGB_1555</a>,
  74. 00052 <a class="code" href="PVRTTexture_8h.html#a176a22">MGLPT_RGB_565</a>,
  75. 00053 <a class="code" href="PVRTTexture_8h.html#a176a23">MGLPT_RGB_555</a>,
  76. 00054 <a class="code" href="PVRTTexture_8h.html#a176a24">MGLPT_RGB_888</a>,
  77. 00055 <a class="code" href="PVRTTexture_8h.html#a176a25">MGLPT_ARGB_8888</a>,
  78. 00056 <a class="code" href="PVRTTexture_8h.html#a176a26">MGLPT_ARGB_8332</a>,
  79. 00057 <a class="code" href="PVRTTexture_8h.html#a176a27">MGLPT_I_8</a>,
  80. 00058 <a class="code" href="PVRTTexture_8h.html#a176a28">MGLPT_AI_88</a>,
  81. 00059 <a class="code" href="PVRTTexture_8h.html#a176a29">MGLPT_1_BPP</a>,
  82. 00060 <a class="code" href="PVRTTexture_8h.html#a176a30">MGLPT_VY1UY0</a>,
  83. 00061 <a class="code" href="PVRTTexture_8h.html#a176a31">MGLPT_Y1VY0U</a>,
  84. 00062 <a class="code" href="PVRTTexture_8h.html#a176a32">MGLPT_PVRTC2</a>,
  85. 00063 <a class="code" href="PVRTTexture_8h.html#a176a33">MGLPT_PVRTC4</a>,
  86. 00064 <a class="code" href="PVRTTexture_8h.html#a176a34">MGLPT_PVRTC2_2</a>,
  87. 00065 <a class="code" href="PVRTTexture_8h.html#a176a35">MGLPT_PVRTC2_4</a>,
  88. 00066
  89. 00067 <a class="code" href="PVRTTexture_8h.html#a176a36">OGL_RGBA_4444</a>= 0x10,
  90. 00068 <a class="code" href="PVRTTexture_8h.html#a176a37">OGL_RGBA_5551</a>,
  91. 00069 <a class="code" href="PVRTTexture_8h.html#a176a38">OGL_RGBA_8888</a>,
  92. 00070 <a class="code" href="PVRTTexture_8h.html#a176a39">OGL_RGB_565</a>,
  93. 00071 <a class="code" href="PVRTTexture_8h.html#a176a40">OGL_RGB_555</a>,
  94. 00072 <a class="code" href="PVRTTexture_8h.html#a176a41">OGL_RGB_888</a>,
  95. 00073 <a class="code" href="PVRTTexture_8h.html#a176a42">OGL_I_8</a>,
  96. 00074 <a class="code" href="PVRTTexture_8h.html#a176a43">OGL_AI_88</a>,
  97. 00075 <a class="code" href="PVRTTexture_8h.html#a176a44">OGL_PVRTC2</a>,
  98. 00076 <a class="code" href="PVRTTexture_8h.html#a176a45">OGL_PVRTC4</a>,
  99. 00077
  100. 00078 <span class="comment">// OGL_BGRA_8888 extension</span>
  101. 00079 <a class="code" href="PVRTTexture_8h.html#a176a46">OGL_BGRA_8888</a>,
  102. 00080 <a class="code" href="PVRTTexture_8h.html#a176a47">OGL_A_8</a>,
  103. 00081
  104. 00082 <a class="code" href="PVRTTexture_8h.html#a176a48">D3D_DXT1</a> = 0x20,
  105. 00083 <a class="code" href="PVRTTexture_8h.html#a176a49">D3D_DXT2</a>,
  106. 00084 <a class="code" href="PVRTTexture_8h.html#a176a50">D3D_DXT3</a>,
  107. 00085 <a class="code" href="PVRTTexture_8h.html#a176a51">D3D_DXT4</a>,
  108. 00086 <a class="code" href="PVRTTexture_8h.html#a176a52">D3D_DXT5</a>,
  109. 00087
  110. 00088 <a class="code" href="PVRTTexture_8h.html#a176a53">D3D_RGB_332</a>,
  111. 00089 <a class="code" href="PVRTTexture_8h.html#a176a54">D3D_AI_44</a>,
  112. 00090 <a class="code" href="PVRTTexture_8h.html#a176a55">D3D_LVU_655</a>,
  113. 00091 <a class="code" href="PVRTTexture_8h.html#a176a56">D3D_XLVU_8888</a>,
  114. 00092 <a class="code" href="PVRTTexture_8h.html#a176a57">D3D_QWVU_8888</a>,
  115. 00093
  116. 00094 <span class="comment">//10 bits per channel</span>
  117. 00095 <a class="code" href="PVRTTexture_8h.html#a176a58">D3D_ABGR_2101010</a>,
  118. 00096 <a class="code" href="PVRTTexture_8h.html#a176a59">D3D_ARGB_2101010</a>,
  119. 00097 <a class="code" href="PVRTTexture_8h.html#a176a60">D3D_AWVU_2101010</a>,
  120. 00098
  121. 00099 <span class="comment">//16 bits per channel</span>
  122. 00100 <a class="code" href="PVRTTexture_8h.html#a176a61">D3D_GR_1616</a>,
  123. 00101 <a class="code" href="PVRTTexture_8h.html#a176a62">D3D_VU_1616</a>,
  124. 00102 <a class="code" href="PVRTTexture_8h.html#a176a63">D3D_ABGR_16161616</a>,
  125. 00103
  126. 00104 <span class="comment">//HDR formats</span>
  127. 00105 <a class="code" href="PVRTTexture_8h.html#a176a64">D3D_R16F</a>,
  128. 00106 <a class="code" href="PVRTTexture_8h.html#a176a65">D3D_GR_1616F</a>,
  129. 00107 <a class="code" href="PVRTTexture_8h.html#a176a66">D3D_ABGR_16161616F</a>,
  130. 00108
  131. 00109 <span class="comment">//32 bits per channel</span>
  132. 00110 <a class="code" href="PVRTTexture_8h.html#a176a67">D3D_R32F</a>,
  133. 00111 <a class="code" href="PVRTTexture_8h.html#a176a68">D3D_GR_3232F</a>,
  134. 00112 <a class="code" href="PVRTTexture_8h.html#a176a69">D3D_ABGR_32323232F</a>,
  135. 00113
  136. 00114 <span class="comment">// Ericsson</span>
  137. 00115 <a class="code" href="PVRTTexture_8h.html#a176a70">ETC_RGB_4BPP</a>,
  138. 00116 <a class="code" href="PVRTTexture_8h.html#a176a71">ETC_RGBA_EXPLICIT</a>,
  139. 00117 <a class="code" href="PVRTTexture_8h.html#a176a72">ETC_RGBA_INTERPOLATED</a>,
  140. 00118
  141. 00119 <span class="comment">// DX10</span>
  142. 00120
  143. 00121
  144. 00122 <a class="code" href="PVRTTexture_8h.html#a176a73">ePT_DX10_R32G32B32A32_FLOAT</a>= 0x50,
  145. 00123 <a class="code" href="PVRTTexture_8h.html#a176a74">ePT_DX10_R32G32B32A32_UINT</a> ,
  146. 00124 <a class="code" href="PVRTTexture_8h.html#a176a75">ePT_DX10_R32G32B32A32_SINT</a>,
  147. 00125
  148. 00126 <a class="code" href="PVRTTexture_8h.html#a176a76">ePT_DX10_R32G32B32_FLOAT</a>,
  149. 00127 <a class="code" href="PVRTTexture_8h.html#a176a77">ePT_DX10_R32G32B32_UINT</a>,
  150. 00128 <a class="code" href="PVRTTexture_8h.html#a176a78">ePT_DX10_R32G32B32_SINT</a>,
  151. 00129
  152. 00130 <a class="code" href="PVRTTexture_8h.html#a176a79">ePT_DX10_R16G16B16A16_FLOAT</a> ,
  153. 00131 <a class="code" href="PVRTTexture_8h.html#a176a80">ePT_DX10_R16G16B16A16_UNORM</a>,
  154. 00132 <a class="code" href="PVRTTexture_8h.html#a176a81">ePT_DX10_R16G16B16A16_UINT</a> ,
  155. 00133 <a class="code" href="PVRTTexture_8h.html#a176a82">ePT_DX10_R16G16B16A16_SNORM</a> ,
  156. 00134 <a class="code" href="PVRTTexture_8h.html#a176a83">ePT_DX10_R16G16B16A16_SINT</a> ,
  157. 00135
  158. 00136 <a class="code" href="PVRTTexture_8h.html#a176a84">ePT_DX10_R32G32_FLOAT</a> ,
  159. 00137 <a class="code" href="PVRTTexture_8h.html#a176a85">ePT_DX10_R32G32_UINT</a> ,
  160. 00138 <a class="code" href="PVRTTexture_8h.html#a176a86">ePT_DX10_R32G32_SINT</a> ,
  161. 00139
  162. 00140 <a class="code" href="PVRTTexture_8h.html#a176a87">ePT_DX10_R10G10B10A2_UNORM</a> ,
  163. 00141 <a class="code" href="PVRTTexture_8h.html#a176a88">ePT_DX10_R10G10B10A2_UINT</a> ,
  164. 00142
  165. 00143 <a class="code" href="PVRTTexture_8h.html#a176a89">ePT_DX10_R11G11B10_FLOAT</a> ,
  166. 00144
  167. 00145 <a class="code" href="PVRTTexture_8h.html#a176a90">ePT_DX10_R8G8B8A8_UNORM</a> ,
  168. 00146 <a class="code" href="PVRTTexture_8h.html#a176a91">ePT_DX10_R8G8B8A8_UNORM_SRGB</a> ,
  169. 00147 <a class="code" href="PVRTTexture_8h.html#a176a92">ePT_DX10_R8G8B8A8_UINT</a> ,
  170. 00148 <a class="code" href="PVRTTexture_8h.html#a176a93">ePT_DX10_R8G8B8A8_SNORM</a> ,
  171. 00149 <a class="code" href="PVRTTexture_8h.html#a176a94">ePT_DX10_R8G8B8A8_SINT</a> ,
  172. 00150
  173. 00151 <a class="code" href="PVRTTexture_8h.html#a176a95">ePT_DX10_R16G16_FLOAT</a> ,
  174. 00152 <a class="code" href="PVRTTexture_8h.html#a176a96">ePT_DX10_R16G16_UNORM</a> ,
  175. 00153 <a class="code" href="PVRTTexture_8h.html#a176a97">ePT_DX10_R16G16_UINT</a> ,
  176. 00154 <a class="code" href="PVRTTexture_8h.html#a176a98">ePT_DX10_R16G16_SNORM</a> ,
  177. 00155 <a class="code" href="PVRTTexture_8h.html#a176a99">ePT_DX10_R16G16_SINT</a> ,
  178. 00156
  179. 00157 <a class="code" href="PVRTTexture_8h.html#a176a100">ePT_DX10_R32_FLOAT</a> ,
  180. 00158 <a class="code" href="PVRTTexture_8h.html#a176a101">ePT_DX10_R32_UINT</a> ,
  181. 00159 <a class="code" href="PVRTTexture_8h.html#a176a102">ePT_DX10_R32_SINT</a> ,
  182. 00160
  183. 00161 <a class="code" href="PVRTTexture_8h.html#a176a103">ePT_DX10_R8G8_UNORM</a> ,
  184. 00162 <a class="code" href="PVRTTexture_8h.html#a176a104">ePT_DX10_R8G8_UINT</a> ,
  185. 00163 <a class="code" href="PVRTTexture_8h.html#a176a105">ePT_DX10_R8G8_SNORM</a> ,
  186. 00164 <a class="code" href="PVRTTexture_8h.html#a176a106">ePT_DX10_R8G8_SINT</a> ,
  187. 00165
  188. 00166 <a class="code" href="PVRTTexture_8h.html#a176a107">ePT_DX10_R16_FLOAT</a> ,
  189. 00167 <a class="code" href="PVRTTexture_8h.html#a176a108">ePT_DX10_R16_UNORM</a> ,
  190. 00168 <a class="code" href="PVRTTexture_8h.html#a176a109">ePT_DX10_R16_UINT</a> ,
  191. 00169 <a class="code" href="PVRTTexture_8h.html#a176a110">ePT_DX10_R16_SNORM</a> ,
  192. 00170 <a class="code" href="PVRTTexture_8h.html#a176a111">ePT_DX10_R16_SINT</a> ,
  193. 00171
  194. 00172 <a class="code" href="PVRTTexture_8h.html#a176a112">ePT_DX10_R8_UNORM</a>,
  195. 00173 <a class="code" href="PVRTTexture_8h.html#a176a113">ePT_DX10_R8_UINT</a>,
  196. 00174 <a class="code" href="PVRTTexture_8h.html#a176a114">ePT_DX10_R8_SNORM</a>,
  197. 00175 <a class="code" href="PVRTTexture_8h.html#a176a115">ePT_DX10_R8_SINT</a>,
  198. 00176
  199. 00177 <a class="code" href="PVRTTexture_8h.html#a176a116">ePT_DX10_A8_UNORM</a>,
  200. 00178 <a class="code" href="PVRTTexture_8h.html#a176a117">ePT_DX10_R1_UNORM</a>,
  201. 00179 <a class="code" href="PVRTTexture_8h.html#a176a118">ePT_DX10_R9G9B9E5_SHAREDEXP</a>,
  202. 00180 <a class="code" href="PVRTTexture_8h.html#a176a119">ePT_DX10_R8G8_B8G8_UNORM</a>,
  203. 00181 <a class="code" href="PVRTTexture_8h.html#a176a120">ePT_DX10_G8R8_G8B8_UNORM</a>,
  204. 00182
  205. 00183 <a class="code" href="PVRTTexture_8h.html#a176a121">ePT_DX10_BC1_UNORM</a>,
  206. 00184 <a class="code" href="PVRTTexture_8h.html#a176a122">ePT_DX10_BC1_UNORM_SRGB</a>,
  207. 00185
  208. 00186 <a class="code" href="PVRTTexture_8h.html#a176a123">ePT_DX10_BC2_UNORM</a>,
  209. 00187 <a class="code" href="PVRTTexture_8h.html#a176a124">ePT_DX10_BC2_UNORM_SRGB</a>,
  210. 00188
  211. 00189 <a class="code" href="PVRTTexture_8h.html#a176a125">ePT_DX10_BC3_UNORM</a>,
  212. 00190 <a class="code" href="PVRTTexture_8h.html#a176a126">ePT_DX10_BC3_UNORM_SRGB</a>,
  213. 00191
  214. 00192 <a class="code" href="PVRTTexture_8h.html#a176a127">ePT_DX10_BC4_UNORM</a>,
  215. 00193 <a class="code" href="PVRTTexture_8h.html#a176a128">ePT_DX10_BC4_SNORM</a>,
  216. 00194
  217. 00195 <a class="code" href="PVRTTexture_8h.html#a176a129">ePT_DX10_BC5_UNORM</a>,
  218. 00196 <a class="code" href="PVRTTexture_8h.html#a176a130">ePT_DX10_BC5_SNORM</a>,
  219. 00197
  220. 00198 <span class="comment">//ePT_DX10_B5G6R5_UNORM, // defined but obsolete - won't actually load in DX10</span>
  221. 00199 <span class="comment">//ePT_DX10_B5G5R5A1_UNORM,</span>
  222. 00200 <span class="comment">//ePT_DX10_B8G8R8A8_UNORM,</span>
  223. 00201 <span class="comment">//ePT_DX10_B8G8R8X8_UNORM,</span>
  224. 00202
  225. 00203 <span class="comment">// OpenVG</span>
  226. 00204
  227. 00205 <span class="comment">/* RGB{A,X} channel ordering */</span>
  228. 00206 <a class="code" href="PVRTTexture_8h.html#a176a131">ePT_VG_sRGBX_8888</a> = 0x90,
  229. 00207 <a class="code" href="PVRTTexture_8h.html#a176a132">ePT_VG_sRGBA_8888</a>,
  230. 00208 <a class="code" href="PVRTTexture_8h.html#a176a133">ePT_VG_sRGBA_8888_PRE</a>,
  231. 00209 <a class="code" href="PVRTTexture_8h.html#a176a134">ePT_VG_sRGB_565</a>,
  232. 00210 <a class="code" href="PVRTTexture_8h.html#a176a135">ePT_VG_sRGBA_5551</a>,
  233. 00211 <a class="code" href="PVRTTexture_8h.html#a176a136">ePT_VG_sRGBA_4444</a>,
  234. 00212 <a class="code" href="PVRTTexture_8h.html#a176a137">ePT_VG_sL_8</a>,
  235. 00213 <a class="code" href="PVRTTexture_8h.html#a176a138">ePT_VG_lRGBX_8888</a>,
  236. 00214 <a class="code" href="PVRTTexture_8h.html#a176a139">ePT_VG_lRGBA_8888</a>,
  237. 00215 <a class="code" href="PVRTTexture_8h.html#a176a140">ePT_VG_lRGBA_8888_PRE</a>,
  238. 00216 <a class="code" href="PVRTTexture_8h.html#a176a141">ePT_VG_lL_8</a>,
  239. 00217 <a class="code" href="PVRTTexture_8h.html#a176a142">ePT_VG_A_8</a>,
  240. 00218 <a class="code" href="PVRTTexture_8h.html#a176a143">ePT_VG_BW_1</a>,
  241. 00219
  242. 00220 <span class="comment">/* {A,X}RGB channel ordering */</span>
  243. 00221 <a class="code" href="PVRTTexture_8h.html#a176a144">ePT_VG_sXRGB_8888</a>,
  244. 00222 <a class="code" href="PVRTTexture_8h.html#a176a145">ePT_VG_sARGB_8888</a>,
  245. 00223 <a class="code" href="PVRTTexture_8h.html#a176a146">ePT_VG_sARGB_8888_PRE</a>,
  246. 00224 <a class="code" href="PVRTTexture_8h.html#a176a147">ePT_VG_sARGB_1555</a>,
  247. 00225 <a class="code" href="PVRTTexture_8h.html#a176a148">ePT_VG_sARGB_4444</a>,
  248. 00226 <a class="code" href="PVRTTexture_8h.html#a176a149">ePT_VG_lXRGB_8888</a>,
  249. 00227 <a class="code" href="PVRTTexture_8h.html#a176a150">ePT_VG_lARGB_8888</a>,
  250. 00228 <a class="code" href="PVRTTexture_8h.html#a176a151">ePT_VG_lARGB_8888_PRE</a>,
  251. 00229
  252. 00230 <span class="comment">/* BGR{A,X} channel ordering */</span>
  253. 00231 <a class="code" href="PVRTTexture_8h.html#a176a152">ePT_VG_sBGRX_8888</a>,
  254. 00232 <a class="code" href="PVRTTexture_8h.html#a176a153">ePT_VG_sBGRA_8888</a>,
  255. 00233 <a class="code" href="PVRTTexture_8h.html#a176a154">ePT_VG_sBGRA_8888_PRE</a>,
  256. 00234 <a class="code" href="PVRTTexture_8h.html#a176a155">ePT_VG_sBGR_565</a>,
  257. 00235 <a class="code" href="PVRTTexture_8h.html#a176a156">ePT_VG_sBGRA_5551</a>,
  258. 00236 <a class="code" href="PVRTTexture_8h.html#a176a157">ePT_VG_sBGRA_4444</a>,
  259. 00237 <a class="code" href="PVRTTexture_8h.html#a176a158">ePT_VG_lBGRX_8888</a>,
  260. 00238 <a class="code" href="PVRTTexture_8h.html#a176a159">ePT_VG_lBGRA_8888</a>,
  261. 00239 <a class="code" href="PVRTTexture_8h.html#a176a160">ePT_VG_lBGRA_8888_PRE</a>,
  262. 00240
  263. 00241 <span class="comment">/* {A,X}BGR channel ordering */</span>
  264. 00242 <a class="code" href="PVRTTexture_8h.html#a176a161">ePT_VG_sXBGR_8888</a>,
  265. 00243 <a class="code" href="PVRTTexture_8h.html#a176a162">ePT_VG_sABGR_8888</a> ,
  266. 00244 <a class="code" href="PVRTTexture_8h.html#a176a163">ePT_VG_sABGR_8888_PRE</a>,
  267. 00245 <a class="code" href="PVRTTexture_8h.html#a176a164">ePT_VG_sABGR_1555</a>,
  268. 00246 <a class="code" href="PVRTTexture_8h.html#a176a165">ePT_VG_sABGR_4444</a>,
  269. 00247 <a class="code" href="PVRTTexture_8h.html#a176a166">ePT_VG_lXBGR_8888</a>,
  270. 00248 <a class="code" href="PVRTTexture_8h.html#a176a167">ePT_VG_lABGR_8888</a>,
  271. 00249 <a class="code" href="PVRTTexture_8h.html#a176a168">ePT_VG_lABGR_8888_PRE</a>,
  272. 00250
  273. 00251 <span class="comment">// max cap for iterating</span>
  274. 00252 <a class="code" href="PVRTTexture_8h.html#a176a169">END_OF_PIXEL_TYPES</a>,
  275. 00253
  276. 00254 <a class="code" href="PVRTTexture_8h.html#a176a170">MGLPT_NOTYPE</a> = 0xff
  277. 00255
  278. 00256 };
  279. 00257
  280. 00258 <span class="comment">/*****************************************************************************</span>
  281. 00259 <span class="comment">* constants</span>
  282. 00260 <span class="comment">*****************************************************************************/</span>
  283. 00261
  284. <a name="l00262"></a><a class="code" href="PVRTTexture_8h.html#a0">00262</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a0">PVRTEX_MIPMAP</a> = (1&lt;&lt;8); <span class="comment">// has mip map levels</span>
  285. <a name="l00263"></a><a class="code" href="PVRTTexture_8h.html#a1">00263</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a1">PVRTEX_TWIDDLE</a> = (1&lt;&lt;9); <span class="comment">// is twiddled</span>
  286. <a name="l00264"></a><a class="code" href="PVRTTexture_8h.html#a2">00264</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a2">PVRTEX_BUMPMAP</a> = (1&lt;&lt;10); <span class="comment">// has normals encoded for a bump map</span>
  287. <a name="l00265"></a><a class="code" href="PVRTTexture_8h.html#a3">00265</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a3">PVRTEX_TILING</a> = (1&lt;&lt;11); <span class="comment">// is bordered for tiled pvr</span>
  288. <a name="l00266"></a><a class="code" href="PVRTTexture_8h.html#a4">00266</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a4">PVRTEX_CUBEMAP</a> = (1&lt;&lt;12); <span class="comment">// is a cubemap/skybox</span>
  289. <a name="l00267"></a><a class="code" href="PVRTTexture_8h.html#a5">00267</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a5">PVRTEX_FALSEMIPCOL</a> = (1&lt;&lt;13); <span class="comment">// are there false coloured MIP levels</span>
  290. <a name="l00268"></a><a class="code" href="PVRTTexture_8h.html#a6">00268</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a6">PVRTEX_VOLUME</a> = (1&lt;&lt;14); <span class="comment">// is this a volume texture</span>
  291. <a name="l00269"></a><a class="code" href="PVRTTexture_8h.html#a7">00269</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a7">PVRTEX_ALPHA</a> = (1&lt;&lt;15); <span class="comment">// v2.1 is there transparency info in the texture</span>
  292. <a name="l00270"></a><a class="code" href="PVRTTexture_8h.html#a8">00270</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a8">PVRTEX_VERTICAL_FLIP</a> = (1&lt;&lt;16); <span class="comment">// v2.1 is the texture vertically flipped</span>
  293. 00271
  294. <a name="l00272"></a><a class="code" href="PVRTTexture_8h.html#a9">00272</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a9">PVRTEX_PIXELTYPE</a> = 0xff; <span class="comment">// pixel type is always in the last 16bits of the flags</span>
  295. <a name="l00273"></a><a class="code" href="PVRTTexture_8h.html#a10">00273</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a10">PVRTEX_IDENTIFIER</a> = 0x21525650; <span class="comment">// the pvr identifier is the characters 'P','V','R'</span>
  296. 00274
  297. <a name="l00275"></a><a class="code" href="PVRTTexture_8h.html#a11">00275</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a11">PVRTEX_V1_HEADER_SIZE</a> = 44; <span class="comment">// old header size was 44 for identification purposes</span>
  298. 00276
  299. <a name="l00277"></a><a class="code" href="PVRTTexture_8h.html#a12">00277</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a12">PVRTC2_MIN_TEXWIDTH</a> = 16;
  300. <a name="l00278"></a><a class="code" href="PVRTTexture_8h.html#a13">00278</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a13">PVRTC2_MIN_TEXHEIGHT</a> = 8;
  301. <a name="l00279"></a><a class="code" href="PVRTTexture_8h.html#a14">00279</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a14">PVRTC4_MIN_TEXWIDTH</a> = 8;
  302. <a name="l00280"></a><a class="code" href="PVRTTexture_8h.html#a15">00280</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a15">PVRTC4_MIN_TEXHEIGHT</a> = 8;
  303. <a name="l00281"></a><a class="code" href="PVRTTexture_8h.html#a16">00281</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a16">ETC_MIN_TEXWIDTH</a> = 4;
  304. <a name="l00282"></a><a class="code" href="PVRTTexture_8h.html#a17">00282</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a17">ETC_MIN_TEXHEIGHT</a> = 4;
  305. <a name="l00283"></a><a class="code" href="PVRTTexture_8h.html#a18">00283</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a18">DXT_MIN_TEXWIDTH</a> = 4;
  306. <a name="l00284"></a><a class="code" href="PVRTTexture_8h.html#a19">00284</a> <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a19">PVRTuint32</a> <a class="code" href="PVRTTexture_8h.html#a19">DXT_MIN_TEXHEIGHT</a> = 4;
  307. 00285
  308. 00286 <span class="comment">/****************************************************************************</span>
  309. 00287 <span class="comment">** Functions</span>
  310. 00288 <span class="comment">****************************************************************************/</span>
  311. 00289
  312. 00290 <span class="comment">/*!***************************************************************************</span>
  313. 00291 <span class="comment">@Function PVRTTextureCreate</span>
  314. 00292 <span class="comment">@Input w Size of the texture</span>
  315. 00293 <span class="comment">@Input h Size of the texture</span>
  316. 00294 <span class="comment">@Input wMin Minimum size of a texture level</span>
  317. 00295 <span class="comment">@Input hMin Minimum size of a texture level</span>
  318. 00296 <span class="comment">@Input nBPP Bits per pixel of the format</span>
  319. 00297 <span class="comment">@Input bMIPMap Create memory for MIP-map levels also?</span>
  320. 00298 <span class="comment">@Return Allocated texture memory (must be free()d)</span>
  321. 00299 <span class="comment">@Description Creates a PVR_Texture_Header structure, including room for</span>
  322. 00300 <span class="comment">the specified texture, in memory.</span>
  323. 00301 <span class="comment">*****************************************************************************/</span>
  324. 00302 <a class="code" href="structPVR__Texture__Header.html">PVR_Texture_Header</a> *<a class="code" href="PVRTTexture_8h.html#a171">PVRTTextureCreate</a>(
  325. 00303 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> w,
  326. 00304 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> h,
  327. 00305 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> wMin,
  328. 00306 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> hMin,
  329. 00307 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nBPP,
  330. 00308 <span class="keyword">const</span> <span class="keywordtype">bool</span> bMIPMap);
  331. 00309
  332. 00310 <span class="comment">/*!***************************************************************************</span>
  333. 00311 <span class="comment">@Function PVRTTextureTile</span>
  334. 00312 <span class="comment">@Modified pOut The tiled texture in system memory</span>
  335. 00313 <span class="comment">@Input pIn The source texture</span>
  336. 00314 <span class="comment">@Input nRepeatCnt Number of times to repeat the source texture</span>
  337. 00315 <span class="comment">@Description Allocates and fills, in system memory, a texture large enough</span>
  338. 00316 <span class="comment">to repeat the source texture specified number of times.</span>
  339. 00317 <span class="comment">*****************************************************************************/</span>
  340. 00318 <span class="keywordtype">void</span> <a class="code" href="PVRTTexture_8h.html#a172">PVRTTextureTile</a>(
  341. 00319 <a class="code" href="structPVR__Texture__Header.html">PVR_Texture_Header</a> **pOut,
  342. 00320 <span class="keyword">const</span> <a class="code" href="structPVR__Texture__Header.html">PVR_Texture_Header</a> * <span class="keyword">const</span> pIn,
  343. 00321 <span class="keyword">const</span> <span class="keywordtype">int</span> nRepeatCnt);
  344. 00322
  345. 00323 <span class="comment">/****************************************************************************</span>
  346. 00324 <span class="comment">** Internal Functions</span>
  347. 00325 <span class="comment">****************************************************************************/</span>
  348. 00326
  349. 00327 <span class="comment">/*!***************************************************************************</span>
  350. 00328 <span class="comment">@Function PVRTTextureLoadTiled</span>
  351. 00329 <span class="comment">@Modified pDst Texture to place the tiled data</span>
  352. 00330 <span class="comment">@Input nWidthDst Width of destination texture</span>
  353. 00331 <span class="comment">@Input nHeightDst Height of destination texture</span>
  354. 00332 <span class="comment">@Input pSrc Texture to tile</span>
  355. 00333 <span class="comment">@Input nWidthSrc Width of source texture</span>
  356. 00334 <span class="comment">@Input nHeightSrc Height of source texture</span>
  357. 00335 <span class="comment">@Input nElementSize Bytes per pixel</span>
  358. 00336 <span class="comment">@Input bTwiddled True if the data is twiddled</span>
  359. 00337 <span class="comment">@Description Needed by PVRTTextureTile() in the various PVRTTextureAPIs</span>
  360. 00338 <span class="comment">*****************************************************************************/</span>
  361. 00339 <span class="keywordtype">void</span> <a class="code" href="PVRTTexture_8h.html#a173">PVRTTextureLoadTiled</a>(
  362. 00340 <a class="code" href="PVRTGlobal_8h.html#a17">PVRTuint8</a> * <span class="keyword">const</span> pDst,
  363. 00341 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nWidthDst,
  364. 00342 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nHeightDst,
  365. 00343 <span class="keyword">const</span> <a class="code" href="PVRTGlobal_8h.html#a17">PVRTuint8</a> * <span class="keyword">const</span> pSrc,
  366. 00344 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nWidthSrc,
  367. 00345 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nHeightSrc,
  368. 00346 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nElementSize,
  369. 00347 <span class="keyword">const</span> <span class="keywordtype">bool</span> bTwiddled);
  370. 00348
  371. 00349
  372. 00350 <span class="comment">/*!***************************************************************************</span>
  373. 00351 <span class="comment">@Function PVRTTextureTwiddle</span>
  374. 00352 <span class="comment">@Output a Twiddled value</span>
  375. 00353 <span class="comment">@Input u Coordinate axis 0</span>
  376. 00354 <span class="comment">@Input v Coordinate axis 1</span>
  377. 00355 <span class="comment">@Description Combine a 2D coordinate into a twiddled value</span>
  378. 00356 <span class="comment">*****************************************************************************/</span>
  379. 00357 <span class="keywordtype">void</span> <a class="code" href="PVRTTexture_8h.html#a174">PVRTTextureTwiddle</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;a, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> u, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> v);
  380. 00358
  381. 00359 <span class="comment">/*!***************************************************************************</span>
  382. 00360 <span class="comment">@Function PVRTTextureDeTwiddle</span>
  383. 00361 <span class="comment">@Output u Coordinate axis 0</span>
  384. 00362 <span class="comment">@Output v Coordinate axis 1</span>
  385. 00363 <span class="comment">@Input a Twiddled value</span>
  386. 00364 <span class="comment">@Description Extract 2D coordinates from a twiddled value.</span>
  387. 00365 <span class="comment">*****************************************************************************/</span>
  388. 00366 <span class="keywordtype">void</span> <a class="code" href="PVRTTexture_8h.html#a175">PVRTTextureDeTwiddle</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;u, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;v, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> a);
  389. 00367
  390. 00368
  391. 00369 <span class="preprocessor">#endif </span><span class="comment">/* _PVRTTEXTURE_H_ */</span>
  392. 00370
  393. 00371 <span class="comment">/*****************************************************************************</span>
  394. 00372 <span class="comment">End of file (PVRTTexture.h)</span>
  395. 00373 <span class="comment">*****************************************************************************/</span>
  396. 00374
  397. </pre></div><br>
  398. <br>
  399. <P align=left><FONT size=2><STRONG><A
  400. href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> ©
  401. 1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
  402. <hr>
  403. <address style="align: left;"><small><FONT color=f0f>
  404. Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
  405. </body>
  406. </html>