PVRTTextureAPI_8h.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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>PVRTTextureAPI.h File Reference</h1><code>#include "<a class="el" href="PVRTError_8h-source.html">../PVRTError.h</a>"</code><br>
  24. <p>
  25. Include dependency graph for PVRTTextureAPI.h:<p><center><img src="PVRTTextureAPI_8h__incl.png" border="0" usemap="#PVRTTextureAPI.h_map" alt="Include dependency graph"></center>
  26. <map name="PVRTTextureAPI.h_map">
  27. <area href="PVRTError_8h.html" shape="rect" coords="19,81,128,108" alt="">
  28. </map>
  29. <p>
  30. This graph shows which files directly or indirectly include this file:<p><center><img src="PVRTTextureAPI_8h__dep__incl.png" border="0" usemap="#PVRTTextureAPI.hdep_map" alt="Included by dependency graph"></center>
  31. <map name="PVRTTextureAPI.hdep_map">
  32. <area href="OGLES2Tools_8h.html" shape="rect" coords="15,7,132,34" alt="">
  33. </map>
  34. <p>
  35. <a href="PVRTTextureAPI_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
  36. <tr><td></td></tr>
  37. <tr><td colspan=2><br><h2>Functions</h2></td></tr>
  38. <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="PVRTError_8h.html#a5">EPVRTError</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="PVRTTextureAPI_8h.html#a0">PVRTTextureLoadFromPointer</a> (const void *pointer, GLuint *const texName, const void *psTextureHeader=NULL, bool bAllowDecompress=true, const unsigned int nLoadFromLevel=0, const void *const texPtr=0)</td></tr>
  39. <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="PVRTError_8h.html#a5">EPVRTError</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="PVRTTextureAPI_8h.html#a1">PVRTTextureLoadFromPVR</a> (const char *const filename, GLuint *const texName, const void *psTextureHeader=NULL, bool bAllowDecompress=true, const unsigned int nLoadFromLevel=0)</td></tr>
  40. <tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="PVRTTextureAPI_8h.html#a2">PVRTTextureFormatGetBPP</a> (const GLuint nFormat, const GLuint nType)</td></tr>
  41. </table>
  42. <hr><h2>Function Documentation</h2>
  43. <a class="anchor" name="a2" doxytag="PVRTTextureAPI.h::PVRTTextureFormatGetBPP" ></a><p>
  44. <br><br><h3>PVRTTextureFormatGetBPP</h3><br><div>
  45. <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  46. <tr>
  47. <td class="mdRow">
  48. <table cellpadding="0" cellspacing="0" border="0">
  49. <tr>
  50. <td class="md" nowrap valign="top"> unsigned int PVRTTextureFormatGetBPP </td>
  51. <td class="md" valign="top">(&nbsp;</td>
  52. <td class="md" nowrap valign="top">const GLuint&nbsp;</td>
  53. <td class="mdname" nowrap> <em>nFormat</em>, </td>
  54. </tr>
  55. <tr>
  56. <td class="md" nowrap align="right"></td>
  57. <td></td>
  58. <td class="md" nowrap>const GLuint&nbsp;</td>
  59. <td class="mdname" nowrap> <em>nType</em></td>
  60. </tr>
  61. <tr>
  62. <td></td>
  63. <td class="md">)&nbsp;</td>
  64. <td class="md" colspan="2"></td>
  65. </tr>
  66. </table>
  67. </td>
  68. </tr>
  69. </table>
  70. <table cellspacing=5 cellpadding=0 border=0>
  71. <tr>
  72. <td>
  73. &nbsp;
  74. </td>
  75. <td>
  76. <p>
  77. <dl compact><dt><b>Inputs:</b></dt><dd>
  78. <table border="0" cellspacing="2" cellpadding="0">
  79. <tr><td valign=top><em>nFormat</em>&nbsp;</td><td></td></tr>
  80. <tr><td valign=top><em>nType</em>&nbsp;</td><td></td></tr>
  81. </table>
  82. </dl>
  83. <dl compact><dt><b>Description:</b></dt><dd>Returns the bits per pixel (BPP) of the format. </dd></dl>
  84. </td>
  85. </tr>
  86. </table>
  87. <a class="anchor" name="a0" doxytag="PVRTTextureAPI.h::PVRTTextureLoadFromPointer" ></a><p>
  88. <br><br><h3>PVRTTextureLoadFromPointer</h3><br><div>
  89. <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  90. <tr>
  91. <td class="mdRow">
  92. <table cellpadding="0" cellspacing="0" border="0">
  93. <tr>
  94. <td class="md" nowrap valign="top"> <a class="el" href="PVRTError_8h.html#a5">EPVRTError</a> PVRTTextureLoadFromPointer </td>
  95. <td class="md" valign="top">(&nbsp;</td>
  96. <td class="md" nowrap valign="top">const void *&nbsp;</td>
  97. <td class="mdname" nowrap> <em>pointer</em>, </td>
  98. </tr>
  99. <tr>
  100. <td class="md" nowrap align="right"></td>
  101. <td></td>
  102. <td class="md" nowrap>GLuint *const&nbsp;</td>
  103. <td class="mdname" nowrap> <em>texName</em>, </td>
  104. </tr>
  105. <tr>
  106. <td class="md" nowrap align="right"></td>
  107. <td></td>
  108. <td class="md" nowrap>const void *&nbsp;</td>
  109. <td class="mdname" nowrap> <em>psTextureHeader</em> = NULL, </td>
  110. </tr>
  111. <tr>
  112. <td class="md" nowrap align="right"></td>
  113. <td></td>
  114. <td class="md" nowrap>bool&nbsp;</td>
  115. <td class="mdname" nowrap> <em>bAllowDecompress</em> = true, </td>
  116. </tr>
  117. <tr>
  118. <td class="md" nowrap align="right"></td>
  119. <td></td>
  120. <td class="md" nowrap>const unsigned int&nbsp;</td>
  121. <td class="mdname" nowrap> <em>nLoadFromLevel</em> = 0, </td>
  122. </tr>
  123. <tr>
  124. <td class="md" nowrap align="right"></td>
  125. <td></td>
  126. <td class="md" nowrap>const void *const&nbsp;</td>
  127. <td class="mdname" nowrap> <em>texPtr</em> = 0</td>
  128. </tr>
  129. <tr>
  130. <td></td>
  131. <td class="md">)&nbsp;</td>
  132. <td class="md" colspan="2"></td>
  133. </tr>
  134. </table>
  135. </td>
  136. </tr>
  137. </table>
  138. <table cellspacing=5 cellpadding=0 border=0>
  139. <tr>
  140. <td>
  141. &nbsp;
  142. </td>
  143. <td>
  144. <p>
  145. <dl compact><dt><b>Inputs:</b></dt><dd>
  146. <table border="0" cellspacing="2" cellpadding="0">
  147. <tr><td valign=top><em>pointer</em>&nbsp;</td><td>Pointer to header-texture's structure </td></tr>
  148. </table>
  149. </dl>
  150. <dl compact><dt><b>Modified:</b></dt><dd>
  151. <table border="0" cellspacing="2" cellpadding="0">
  152. <tr><td valign=top><em>texName</em>&nbsp;</td><td>the OpenGL ES texture name as returned by glBindTexture </td></tr>
  153. <tr><td valign=top><em>psTextureHeader</em>&nbsp;</td><td>Pointer to a <a class="el" href="structPVR__Texture__Header.html">PVR_Texture_Header</a> struct. Modified to contain the header data of the returned texture Ignored if NULL. </td></tr>
  154. </table>
  155. </dl>
  156. <dl compact><dt><b>Inputs:</b></dt><dd>
  157. <table border="0" cellspacing="2" cellpadding="0">
  158. <tr><td valign=top><em>bAllowDecompress</em>&nbsp;</td><td>Allow decompression if PVRTC is not supported in hardware. </td></tr>
  159. <tr><td valign=top><em>nLoadFromLevel</em>&nbsp;</td><td>Which mipmap level to start loading from (0=all) </td></tr>
  160. <tr><td valign=top><em>texPtr</em>&nbsp;</td><td>If null, texture follows header, else texture is here. </td></tr>
  161. </table>
  162. </dl>
  163. <dl compact><dt><b>Returns:</b></dt><dd>PVR_SUCCESS on success </dd></dl>
  164. <dl compact><dt><b>Description:</b></dt><dd>Allows textures to be stored in C header files and loaded in. Can load parts of a mipmaped texture (ie skipping the highest detailed levels). Sets the texture MIN/MAG filter to GL_LINEAR_MIPMAP_NEAREST/GL_LINEAR if mipmaps are present, GL_LINEAR/GL_LINEAR otherwise. </dd></dl>
  165. </td>
  166. </tr>
  167. </table>
  168. <a class="anchor" name="a1" doxytag="PVRTTextureAPI.h::PVRTTextureLoadFromPVR" ></a><p>
  169. <br><br><h3>PVRTTextureLoadFromPVR</h3><br><div>
  170. <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  171. <tr>
  172. <td class="mdRow">
  173. <table cellpadding="0" cellspacing="0" border="0">
  174. <tr>
  175. <td class="md" nowrap valign="top"> <a class="el" href="PVRTError_8h.html#a5">EPVRTError</a> PVRTTextureLoadFromPVR </td>
  176. <td class="md" valign="top">(&nbsp;</td>
  177. <td class="md" nowrap valign="top">const char *const&nbsp;</td>
  178. <td class="mdname" nowrap> <em>filename</em>, </td>
  179. </tr>
  180. <tr>
  181. <td class="md" nowrap align="right"></td>
  182. <td></td>
  183. <td class="md" nowrap>GLuint *const&nbsp;</td>
  184. <td class="mdname" nowrap> <em>texName</em>, </td>
  185. </tr>
  186. <tr>
  187. <td class="md" nowrap align="right"></td>
  188. <td></td>
  189. <td class="md" nowrap>const void *&nbsp;</td>
  190. <td class="mdname" nowrap> <em>psTextureHeader</em> = NULL, </td>
  191. </tr>
  192. <tr>
  193. <td class="md" nowrap align="right"></td>
  194. <td></td>
  195. <td class="md" nowrap>bool&nbsp;</td>
  196. <td class="mdname" nowrap> <em>bAllowDecompress</em> = true, </td>
  197. </tr>
  198. <tr>
  199. <td class="md" nowrap align="right"></td>
  200. <td></td>
  201. <td class="md" nowrap>const unsigned int&nbsp;</td>
  202. <td class="mdname" nowrap> <em>nLoadFromLevel</em> = 0</td>
  203. </tr>
  204. <tr>
  205. <td></td>
  206. <td class="md">)&nbsp;</td>
  207. <td class="md" colspan="2"></td>
  208. </tr>
  209. </table>
  210. </td>
  211. </tr>
  212. </table>
  213. <table cellspacing=5 cellpadding=0 border=0>
  214. <tr>
  215. <td>
  216. &nbsp;
  217. </td>
  218. <td>
  219. <p>
  220. <dl compact><dt><b>Inputs:</b></dt><dd>
  221. <table border="0" cellspacing="2" cellpadding="0">
  222. <tr><td valign=top><em>filename</em>&nbsp;</td><td>Filename of the .PVR file to load the texture from </td></tr>
  223. </table>
  224. </dl>
  225. <dl compact><dt><b>Modified:</b></dt><dd>
  226. <table border="0" cellspacing="2" cellpadding="0">
  227. <tr><td valign=top><em>texName</em>&nbsp;</td><td>the OpenGL ES texture name as returned by glBindTexture </td></tr>
  228. <tr><td valign=top><em>psTextureHeader</em>&nbsp;</td><td>Pointer to a <a class="el" href="structPVR__Texture__Header.html">PVR_Texture_Header</a> struct. Modified to contain the header data of the returned texture Ignored if NULL. </td></tr>
  229. </table>
  230. </dl>
  231. <dl compact><dt><b>Inputs:</b></dt><dd>
  232. <table border="0" cellspacing="2" cellpadding="0">
  233. <tr><td valign=top><em>bAllowDecompress</em>&nbsp;</td><td>Allow decompression if PVRTC is not supported in hardware. </td></tr>
  234. <tr><td valign=top><em>nLoadFromLevel</em>&nbsp;</td><td>Which mipmap level to start loading from (0=all) </td></tr>
  235. </table>
  236. </dl>
  237. <dl compact><dt><b>Returns:</b></dt><dd>PVR_SUCCESS on success </dd></dl>
  238. <dl compact><dt><b>Description:</b></dt><dd>Allows textures to be stored in binary PVR files and loaded in. Can load parts of a mipmaped texture (ie skipping the highest detailed levels). Sets the texture MIN/MAG filter to GL_LINEAR_MIPMAP_NEAREST/GL_LINEAR if mipmaps are present, GL_LINEAR/GL_LINEAR otherwise. </dd></dl>
  239. </td>
  240. </tr>
  241. </table>
  242. <br>
  243. <br>
  244. <P align=left><FONT size=2><STRONG><A
  245. href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> ©
  246. 1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
  247. <hr>
  248. <address style="align: left;"><small><FONT color=f0f>
  249. Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
  250. </body>
  251. </html>