PVRShellImpl_8h-source.html 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  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>PVRShellImpl.h</h1><a href="PVRShellImpl_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 PVRShellImpl.h</span>
  26. 00004 <span class="comment"></span>
  27. 00005 <span class="comment"> @Title PVRShellImpl</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 Independent</span>
  34. 00012 <span class="comment"></span>
  35. 00013 <span class="comment"> @Description Makes programming for 3D APIs easier by wrapping surface</span>
  36. 00014 <span class="comment"> initialization, Texture allocation and other functions for use by a demo.</span>
  37. 00015 <span class="comment"></span>
  38. 00016 <span class="comment">******************************************************************************/</span>
  39. 00017
  40. 00018 <span class="preprocessor">#ifndef __PVRSHELLIMPL_H_</span>
  41. 00019 <span class="preprocessor"></span><span class="preprocessor">#define __PVRSHELLIMPL_H_</span>
  42. 00020 <span class="preprocessor"></span>
  43. 00021 <span class="comment">/*****************************************************************************</span>
  44. 00022 <span class="comment">** Build options</span>
  45. 00023 <span class="comment">*****************************************************************************/</span>
  46. 00024
  47. 00025
  48. 00026 <span class="comment">/*****************************************************************************</span>
  49. 00027 <span class="comment">** Macros</span>
  50. 00028 <span class="comment">*****************************************************************************/</span>
  51. 00029 <span class="preprocessor">#define FREE(X) { if(X) { free(X); (X)=0; } }</span>
  52. 00030 <span class="preprocessor"></span>
  53. 00031 <span class="preprocessor">#ifndef _ASSERT</span>
  54. 00032 <span class="preprocessor"></span><span class="preprocessor">#define _ASSERT(X) </span>
  55. <a name="l00033"></a><a class="code" href="PVRShellImpl_8h.html#a0">00033</a> <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  56. 00034 <span class="preprocessor"></span>
  57. 00035 <span class="comment">/*****************************************************************************</span>
  58. <a name="l00036"></a><a class="code" href="PVRShellImpl_8h.html#a1">00036</a> <span class="comment">** Defines</span>
  59. 00037 <span class="comment">*****************************************************************************/</span>
  60. 00038 <span class="preprocessor">#define STR_WNDTITLE (" - Build ")</span>
  61. 00039 <span class="preprocessor"></span>
  62. 00040 <span class="comment">/*!***************************************************************************</span>
  63. 00041 <span class="comment"> @Struct PVRShellData</span>
  64. 00042 <span class="comment"> @Brief Holds PVRShell internal data.</span>
  65. <a name="l00043"></a><a class="code" href="PVRShellImpl_8h.html#a2">00043</a> <span class="comment">*****************************************************************************/</span>
  66. 00044 <span class="keyword">struct </span><a class="code" href="structPVRShellData.html">PVRShellData</a>
  67. 00045 {
  68. 00046 <span class="comment">// Shell Interface Data</span>
  69. 00047 <span class="keywordtype">char</span> *pszAppName;
  70. 00048 <span class="keywordtype">char</span> *pszExitMessage;
  71. <a name="l00049"></a><a class="code" href="structPVRShellData.html">00049</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o2">nShellDimX</a>;
  72. 00050 <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o3">nShellDimY</a>;
  73. 00051 <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o4">nShellPosX</a>;
  74. <a name="l00052"></a><a class="code" href="structPVRShellData.html#o0">00052</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o5">nShellPosY</a>;
  75. <a name="l00053"></a><a class="code" href="structPVRShellData.html#o1">00053</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o6">bFullScreen</a>;
  76. <a name="l00054"></a><a class="code" href="structPVRShellData.html#o2">00054</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o7">bLandscape</a>;
  77. <a name="l00055"></a><a class="code" href="structPVRShellData.html#o3">00055</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o8">bNeedPbuffer</a>;
  78. <a name="l00056"></a><a class="code" href="structPVRShellData.html#o4">00056</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o9">bNeedZbuffer</a>;
  79. <a name="l00057"></a><a class="code" href="structPVRShellData.html#o5">00057</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o10">bNeedStencilBuffer</a>;
  80. <a name="l00058"></a><a class="code" href="structPVRShellData.html#o6">00058</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o11">bNeedPixmap</a>;
  81. <a name="l00059"></a><a class="code" href="structPVRShellData.html#o7">00059</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o12">bNeedPixmapDisableCopy</a>;
  82. <a name="l00060"></a><a class="code" href="structPVRShellData.html#o8">00060</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o13">bLockableBackBuffer</a>;
  83. <a name="l00061"></a><a class="code" href="structPVRShellData.html#o9">00061</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o14">bSoftwareRender</a>;
  84. <a name="l00062"></a><a class="code" href="structPVRShellData.html#o10">00062</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o15">bNeedOpenVG</a>;
  85. <a name="l00063"></a><a class="code" href="structPVRShellData.html#o11">00063</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o16">bNeedAlphaFormatPre</a>;
  86. <a name="l00064"></a><a class="code" href="structPVRShellData.html#o12">00064</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o17">bUsingPowerSaving</a>;
  87. <a name="l00065"></a><a class="code" href="structPVRShellData.html#o13">00065</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o18">bOutputInfo</a>;
  88. <a name="l00066"></a><a class="code" href="structPVRShellData.html#o14">00066</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o19">bNoShellSwapBuffer</a>;
  89. <a name="l00067"></a><a class="code" href="structPVRShellData.html#o15">00067</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o20">nSwapInterval</a>;
  90. <a name="l00068"></a><a class="code" href="structPVRShellData.html#o16">00068</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o21">nInitRepeats</a>;
  91. <a name="l00069"></a><a class="code" href="structPVRShellData.html#o17">00069</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o22">nDieAfterFrames</a>;
  92. <a name="l00070"></a><a class="code" href="structPVRShellData.html#o18">00070</a> <span class="keywordtype">float</span> <a class="code" href="structPVRShellData.html#o23">fDieAfterTime</a>;
  93. <a name="l00071"></a><a class="code" href="structPVRShellData.html#o19">00071</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o24">nFSAAMode</a>;
  94. <a name="l00072"></a><a class="code" href="structPVRShellData.html#o20">00072</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o25">nColorBPP</a>;
  95. <a name="l00073"></a><a class="code" href="structPVRShellData.html#o21">00073</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o26">nDepthBPP</a>;
  96. <a name="l00074"></a><a class="code" href="structPVRShellData.html#o22">00074</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o27">nCaptureFrameStart</a>;
  97. <a name="l00075"></a><a class="code" href="structPVRShellData.html#o23">00075</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o28">nCaptureFrameStop</a>;
  98. <a name="l00076"></a><a class="code" href="structPVRShellData.html#o24">00076</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o29">nPriority</a>;
  99. <a name="l00077"></a><a class="code" href="structPVRShellData.html#o25">00077</a>
  100. <a name="l00078"></a><a class="code" href="structPVRShellData.html#o26">00078</a> <span class="comment">// Internal Data</span>
  101. <a name="l00079"></a><a class="code" href="structPVRShellData.html#o27">00079</a> <span class="keywordtype">bool</span> <a class="code" href="structPVRShellData.html#o30">bShellPosWasDefault</a>;
  102. <a name="l00080"></a><a class="code" href="structPVRShellData.html#o28">00080</a> <span class="keywordtype">int</span> <a class="code" href="structPVRShellData.html#o31">nShellCurFrameNum</a>;
  103. <a name="l00081"></a><a class="code" href="structPVRShellData.html#o29">00081</a> <span class="preprocessor">#ifdef PVRSHELL_FPS_OUTPUT</span>
  104. 00082 <span class="preprocessor"></span> <span class="keywordtype">bool</span> bOutputFPS;
  105. 00083 <span class="preprocessor">#endif</span>
  106. <a name="l00084"></a><a class="code" href="structPVRShellData.html#o30">00084</a> <span class="preprocessor"></span>};
  107. <a name="l00085"></a><a class="code" href="structPVRShellData.html#o31">00085</a>
  108. 00086 <span class="comment">/*!***************************************************************************</span>
  109. 00087 <span class="comment"> @Class PVRShellCommandLine</span>
  110. 00088 <span class="comment"> @Brief Command-line interpreter</span>
  111. 00089 <span class="comment">*****************************************************************************/</span>
  112. 00090 <span class="keyword">class </span><a class="code" href="classPVRShellCommandLine.html">PVRShellCommandLine</a>
  113. 00091 {
  114. 00092 <span class="keyword">public</span>:
  115. 00093 <span class="keywordtype">char</span> *m_psOrig, *m_psSplit;
  116. 00094 <a class="code" href="structSCmdLineOpt.html">SCmdLineOpt</a> *m_pOpt;
  117. <a name="l00095"></a><a class="code" href="classPVRShellCommandLine.html">00095</a> <span class="keywordtype">int</span> <a class="code" href="classPVRShellCommandLine.html#o3">m_nOptLen</a>, <a class="code" href="classPVRShellCommandLine.html#o4">m_nOptMax</a>;
  118. 00096
  119. 00097 <span class="keyword">public</span>:
  120. <a name="l00098"></a><a class="code" href="classPVRShellCommandLine.html#o1">00098</a> <span class="comment">/*!***********************************************************************</span>
  121. <a name="l00099"></a><a class="code" href="classPVRShellCommandLine.html#o2">00099</a> <span class="comment"> @Function PVRShellCommandLine</span>
  122. <a name="l00100"></a><a class="code" href="classPVRShellCommandLine.html#o4">00100</a> <span class="comment"> @Description Constructor</span>
  123. 00101 <span class="comment"> *************************************************************************/</span>
  124. 00102 <a class="code" href="classPVRShellCommandLine.html#a0">PVRShellCommandLine</a>();
  125. 00103
  126. 00104 <span class="comment">/*!***********************************************************************</span>
  127. 00105 <span class="comment"> @Function PVRShellCommandLine</span>
  128. 00106 <span class="comment"> @Description Destructor</span>
  129. 00107 <span class="comment"> *************************************************************************/</span>
  130. 00108 <a class="code" href="classPVRShellCommandLine.html#a1">~PVRShellCommandLine</a>();
  131. 00109
  132. 00110 <span class="comment">/*!***********************************************************************</span>
  133. 00111 <span class="comment"> @Function Set</span>
  134. 00112 <span class="comment"> @Input pStr Input string</span>
  135. 00113 <span class="comment"> @Description Set command-line options to pStr</span>
  136. 00114 <span class="comment"> *************************************************************************/</span>
  137. 00115 <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a2">Set</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pStr);
  138. 00116
  139. 00117 <span class="comment">/*!***********************************************************************</span>
  140. 00118 <span class="comment"> @Function Set</span>
  141. 00119 <span class="comment"> @Input pStr Input string</span>
  142. 00120 <span class="comment"> @Description Prepend command-line options to m_psOrig</span>
  143. 00121 <span class="comment"> *************************************************************************/</span>
  144. 00122 <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a3">Prefix</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pStr);
  145. 00123
  146. 00124 <span class="comment">/*!***********************************************************************</span>
  147. 00125 <span class="comment"> @Function PrependFromFile</span>
  148. 00126 <span class="comment"> @Input pFileName Input string</span>
  149. 00127 <span class="comment"> @Description Prepend command-line options to m_psOrig from a file</span>
  150. 00128 <span class="comment"> *************************************************************************/</span>
  151. 00129 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellCommandLine.html#a4">PrefixFromFile</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pFileName);
  152. 00130
  153. 00131 <span class="comment">/*!***********************************************************************</span>
  154. 00132 <span class="comment"> @Function Parse</span>
  155. 00133 <span class="comment"> @Description Parse m_psOrig for command-line options and store them in m_pOpt</span>
  156. 00134 <span class="comment"> *************************************************************************/</span>
  157. 00135 <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a5">Parse</a>();
  158. 00136
  159. 00137 <span class="comment">/*!***********************************************************************</span>
  160. 00138 <span class="comment"> @Function Apply</span>
  161. 00139 <span class="comment"> @Input shell</span>
  162. 00140 <span class="comment"> @Description Apply the command-line options to shell</span>
  163. 00141 <span class="comment"> *************************************************************************/</span>
  164. 00142 <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a6">Apply</a>(<a class="code" href="classPVRShell.html">PVRShell</a> &amp;shell);
  165. 00143 };
  166. 00144
  167. 00145 <span class="comment">/*!****************************************************************************</span>
  168. 00146 <span class="comment"> * @Enum EPVRShellState</span>
  169. 00147 <span class="comment"> * @Brief Current Shell state</span>
  170. 00148 <span class="comment">*****************************************************************************/</span>
  171. 00149 <span class="keyword">enum</span> <a class="code" href="PVRShellImpl_8h.html#a11">EPVRShellState</a> {
  172. 00150 <a class="code" href="PVRShellImpl_8h.html#a11a3">ePVRShellInitApp</a>,
  173. 00151 <a class="code" href="PVRShellImpl_8h.html#a11a4">ePVRShellInitInstance</a>,
  174. 00152 <a class="code" href="PVRShellImpl_8h.html#a11a5">ePVRShellRender</a>,
  175. 00153 <a class="code" href="PVRShellImpl_8h.html#a11a6">ePVRShellReleaseView</a>,
  176. 00154 <a class="code" href="PVRShellImpl_8h.html#a11a7">ePVRShellReleaseAPI</a>,
  177. 00155 <a class="code" href="PVRShellImpl_8h.html#a11a8">ePVRShellReleaseOS</a>,
  178. 00156 <a class="code" href="PVRShellImpl_8h.html#a11a9">ePVRShellQuitApp</a>,
  179. 00157 <a class="code" href="PVRShellImpl_8h.html#a11a10">ePVRShellExit</a>
  180. 00158 };
  181. 00159
  182. 00160 <span class="comment">/*!***************************************************************************</span>
  183. <a name="l00161"></a><a class="code" href="PVRShellImpl_8h.html#a11">00161</a> <span class="comment"> * @Class PVRShellInit</span>
  184. 00162 <span class="comment"> * @Brief The PVRShell initialisation class</span>
  185. 00163 <span class="comment"> ****************************************************************************/</span>
  186. 00164 <span class="keyword">class </span><a class="code" href="classPVRShellInit.html">PVRShellInit</a> : <span class="keyword">public</span> <a class="code" href="classPVRShellInitAPI.html">PVRShellInitAPI</a>, <span class="keyword">public</span> <a class="code" href="classPVRShellInitOS.html">PVRShellInitOS</a>
  187. 00165 {
  188. 00166 <span class="keyword">public</span>:
  189. 00167 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShell.html">PVRShell</a>;
  190. 00168 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShellInitOS.html">PVRShellInitOS</a>;
  191. 00169 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShellInitAPI.html">PVRShellInitAPI</a>;
  192. 00170
  193. 00171 <a class="code" href="classPVRShell.html">PVRShell</a> *m_pShell;
  194. 00172 <a class="code" href="classPVRShellCommandLine.html">PVRShellCommandLine</a> m_CommandLine;
  195. 00174 <span class="keywordtype">bool</span> gShellDone;
  196. 00175 <a class="code" href="PVRShellImpl_8h.html#a11">EPVRShellState</a> m_eState;
  197. 00177 <span class="comment">// Key handling</span>
  198. 00178 <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> nLastKeyPressed;
  199. <a name="l00179"></a><a class="code" href="classPVRShellInit.html#n0">00179</a> <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o5">m_eKeyMapLEFT</a>;
  200. <a name="l00180"></a><a class="code" href="classPVRShellInit.html#n1">00180</a> <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o6">m_eKeyMapUP</a>;
  201. <a name="l00181"></a><a class="code" href="classPVRShellInit.html#n2">00181</a> <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o7">m_eKeyMapRIGHT</a>;
  202. 00182 <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o8">m_eKeyMapDOWN</a>;
  203. <a name="l00184"></a><a class="code" href="classPVRShellInit.html#o1">00184</a> <span class="comment">// Read and Write path</span>
  204. 00185 <span class="keywordtype">char</span> *<a class="code" href="classPVRShellInit.html#o9">m_pReadPath</a>;
  205. <a name="l00186"></a><a class="code" href="classPVRShellInit.html#o2">00186</a> <span class="keywordtype">char</span> *<a class="code" href="classPVRShellInit.html#o10">m_pWritePath</a>;
  206. 00188 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classPVRShellInit.html#o11">m_u32ShellStartTime</a>;
  207. 00189 <span class="preprocessor">#ifdef PVRSHELL_FPS_OUTPUT</span>
  208. <a name="l00190"></a><a class="code" href="classPVRShellInit.html#o4">00190</a> <span class="preprocessor"></span> <span class="comment">// Frames per second (FPS)</span>
  209. <a name="l00191"></a><a class="code" href="classPVRShellInit.html#o5">00191</a> <span class="keywordtype">int</span> m_i32FpsFrameCnt, m_i32FpsTimePrev;
  210. <a name="l00192"></a><a class="code" href="classPVRShellInit.html#o6">00192</a> <span class="preprocessor">#endif</span>
  211. <a name="l00193"></a><a class="code" href="classPVRShellInit.html#o7">00193</a> <span class="preprocessor"></span>
  212. <a name="l00194"></a><a class="code" href="classPVRShellInit.html#o8">00194</a> <span class="keyword">public</span>:
  213. 00195
  214. 00196 <span class="comment">/*!***********************************************************************</span>
  215. <a name="l00197"></a><a class="code" href="classPVRShellInit.html#o9">00197</a> <span class="comment"> @Function PVRShellInit</span>
  216. <a name="l00198"></a><a class="code" href="classPVRShellInit.html#o10">00198</a> <span class="comment"> @description Constructor</span>
  217. 00199 <span class="comment"> *************************************************************************/</span>
  218. <a name="l00200"></a><a class="code" href="classPVRShellInit.html#o11">00200</a> <a class="code" href="classPVRShellInit.html#a0">PVRShellInit</a>();
  219. 00201
  220. 00202 <span class="comment">/*!***********************************************************************</span>
  221. 00203 <span class="comment"> @Function ~PVRShellInit</span>
  222. 00204 <span class="comment"> @description Destructor</span>
  223. 00205 <span class="comment"> *************************************************************************/</span>
  224. 00206 <a class="code" href="classPVRShellInit.html#a1">~PVRShellInit</a>();
  225. 00207
  226. 00208 <span class="comment">/*!***********************************************************************</span>
  227. 00209 <span class="comment"> @Function Init</span>
  228. 00210 <span class="comment"> @Returns True on success and false on failure</span>
  229. 00211 <span class="comment"> @description PVRShell Initialisation.</span>
  230. 00212 <span class="comment"> *************************************************************************/</span>
  231. 00213 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a2">Init</a>();
  232. 00214
  233. 00215 <span class="comment">/*!***********************************************************************</span>
  234. 00216 <span class="comment"> @Function Deinit</span>
  235. 00217 <span class="comment"> @Description PVRShell Deinitialisation.</span>
  236. 00218 <span class="comment"> *************************************************************************/</span>
  237. 00219 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a3">Deinit</a>();
  238. 00220
  239. 00221 <span class="comment">/*!***********************************************************************</span>
  240. 00222 <span class="comment"> @Function CommandLine</span>
  241. 00223 <span class="comment"> @Input str A string containing the command-line</span>
  242. 00224 <span class="comment"> @description Receives the command-line from the application.</span>
  243. 00225 <span class="comment"> *************************************************************************/</span>
  244. 00226 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a4">CommandLine</a>(<span class="keywordtype">char</span> *str);
  245. 00227
  246. 00228 <span class="comment">/*!***********************************************************************</span>
  247. 00229 <span class="comment"> @Function CommandLine</span>
  248. 00230 <span class="comment"> @Input argc Number of strings in argv</span>
  249. 00231 <span class="comment"> @Input argv An array of strings</span>
  250. 00232 <span class="comment"> @description Receives the command-line from the application.</span>
  251. 00233 <span class="comment"> *************************************************************************/</span>
  252. 00234 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a4">CommandLine</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv);
  253. 00235
  254. 00236 <span class="comment">/*!***********************************************************************</span>
  255. 00237 <span class="comment"> @Function DoIsKeyPressed</span>
  256. 00238 <span class="comment"> @Input key The key we're querying for</span>
  257. 00239 <span class="comment"> @description Return 'true' if the specific key has been pressed.</span>
  258. 00240 <span class="comment"> *************************************************************************/</span>
  259. 00241 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a6">DoIsKeyPressed</a>(<span class="keyword">const</span> PVRShellKeyName key);
  260. 00242
  261. 00243 <span class="comment">/*!***********************************************************************</span>
  262. 00244 <span class="comment"> @Function KeyPressed</span>
  263. 00245 <span class="comment"> @Input key The key that has been pressed</span>
  264. 00246 <span class="comment"> @description Used by the OS-specific code to tell the Shell that a key has been pressed.</span>
  265. 00247 <span class="comment"> *************************************************************************/</span>
  266. 00248 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a7">KeyPressed</a>(PVRShellKeyName key);
  267. 00249
  268. 00250 <span class="comment">/*!***********************************************************************</span>
  269. 00251 <span class="comment"> @Function GetReadPath</span>
  270. 00252 <span class="comment"> @Returns A path the application is capable of reading from</span>
  271. 00253 <span class="comment"> @description Used by the OS-specific code to tell the Shell where to read external files from</span>
  272. 00254 <span class="comment"> *************************************************************************/</span>
  273. 00255 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classPVRShellInit.html#a8">GetReadPath</a>() <span class="keyword">const</span>;
  274. 00256
  275. 00257 <span class="comment">/*!***********************************************************************</span>
  276. 00258 <span class="comment"> @Function GetWritePath</span>
  277. 00259 <span class="comment"> @Returns A path the applications is capable of writing to</span>
  278. 00260 <span class="comment"> @description Used by the OS-specific code to tell the Shell where to write to</span>
  279. 00261 <span class="comment"> *************************************************************************/</span>
  280. 00262 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classPVRShellInit.html#a9">GetWritePath</a>() <span class="keyword">const</span>;
  281. 00263
  282. 00264 <span class="comment">/*!******************************************************************************</span>
  283. 00265 <span class="comment"> @Function SetAppName</span>
  284. 00266 <span class="comment"> @Input str The application name</span>
  285. 00267 <span class="comment"> @Description Sets the default app name (to be displayed by the OS)</span>
  286. 00268 <span class="comment"> *******************************************************************************/</span>
  287. 00269 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a10">SetAppName</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> str);
  288. 00270
  289. 00271 <span class="comment">/*!***********************************************************************</span>
  290. 00272 <span class="comment"> @Function SetReadPath</span>
  291. 00273 <span class="comment"> @Input str The read path</span>
  292. 00274 <span class="comment"> @description Set the path to where the application expects to read from.</span>
  293. 00275 <span class="comment"> *************************************************************************/</span>
  294. 00276 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a11">SetReadPath</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> str);
  295. 00277
  296. 00278 <span class="comment">/*!***********************************************************************</span>
  297. 00279 <span class="comment"> @Function SetWritePath</span>
  298. 00280 <span class="comment"> @Input str The write path</span>
  299. 00281 <span class="comment"> @description Set the path to where the application expects to write to.</span>
  300. 00282 <span class="comment"> *************************************************************************/</span>
  301. 00283 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a12">SetWritePath</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> str);
  302. 00284
  303. 00285 <span class="comment">/*!***********************************************************************</span>
  304. 00286 <span class="comment"> @Function Run</span>
  305. 00287 <span class="comment"> @description Called from the OS-specific code to perform the render.</span>
  306. 00288 <span class="comment"> When this fucntion fails the application will quit.</span>
  307. 00289 <span class="comment"> *************************************************************************/</span>
  308. 00290 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a13">Run</a>();
  309. 00291
  310. 00292 <span class="comment">/*!***********************************************************************</span>
  311. 00293 <span class="comment"> @Function OutputInfo</span>
  312. 00294 <span class="comment"> @description When prefOutputInfo is set to true this function outputs</span>
  313. 00295 <span class="comment"> various pieces of non-API dependent information via</span>
  314. 00296 <span class="comment"> PVRShellOutputDebug.</span>
  315. 00297 <span class="comment"> *************************************************************************/</span>
  316. 00298 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a14">OutputInfo</a>();
  317. 00299
  318. 00300 <span class="comment">/*!***********************************************************************</span>
  319. 00301 <span class="comment"> @Function OutputAPIInfo</span>
  320. 00302 <span class="comment"> @description When prefOutputInfo is set to true this function outputs</span>
  321. 00303 <span class="comment"> various pieces of API dependent information via</span>
  322. 00304 <span class="comment"> PVRShellOutputDebug.</span>
  323. 00305 <span class="comment"> *************************************************************************/</span>
  324. 00306 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a15">OutputAPIInfo</a>();
  325. 00307
  326. 00308 <span class="preprocessor">#ifdef PVRSHELL_FPS_OUTPUT</span>
  327. 00309 <span class="preprocessor"></span> <span class="comment">/*!****************************************************************************</span>
  328. 00310 <span class="comment"> @Function FpsUpdate</span>
  329. 00311 <span class="comment"> @Description Calculates a value for frames-per-second (FPS).</span>
  330. 00312 <span class="comment"> *****************************************************************************/</span>
  331. 00313 <span class="keywordtype">void</span> FpsUpdate();
  332. 00314 <span class="preprocessor">#endif</span>
  333. 00315 <span class="preprocessor"></span>
  334. 00316 <span class="comment">/*</span>
  335. 00317 <span class="comment"> OS functionality</span>
  336. 00318 <span class="comment"> */</span>
  337. 00319
  338. 00320 <span class="comment">/*!***********************************************************************</span>
  339. 00321 <span class="comment"> @Function OsInit</span>
  340. 00322 <span class="comment"> @description Initialisation for OS-specific code.</span>
  341. 00323 <span class="comment"> *************************************************************************/</span>
  342. 00324 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a16">OsInit</a>();
  343. 00325
  344. 00326 <span class="comment">/*!***********************************************************************</span>
  345. 00327 <span class="comment"> @Function OsInitOS</span>
  346. 00328 <span class="comment"> @description Saves instance handle and creates main window</span>
  347. 00329 <span class="comment"> In this function, we save the instance handle in a global variable and</span>
  348. 00330 <span class="comment"> create and display the main program window.</span>
  349. 00331 <span class="comment"> *************************************************************************/</span>
  350. 00332 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a17">OsInitOS</a>();
  351. 00333
  352. 00334 <span class="comment">/*!***********************************************************************</span>
  353. 00335 <span class="comment"> @Function OsReleaseOS</span>
  354. 00336 <span class="comment"> @description Destroys main window</span>
  355. 00337 <span class="comment"> *************************************************************************/</span>
  356. 00338 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a18">OsReleaseOS</a>();
  357. 00339
  358. 00340 <span class="comment">/*!***********************************************************************</span>
  359. 00341 <span class="comment"> @Function OsExit</span>
  360. 00342 <span class="comment"> @description Destroys main window</span>
  361. 00343 <span class="comment"> *************************************************************************/</span>
  362. 00344 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a19">OsExit</a>();
  363. 00345
  364. 00346 <span class="comment">/*!***********************************************************************</span>
  365. 00347 <span class="comment"> @Function OsDoInitAPI</span>
  366. 00348 <span class="comment"> @description Perform API initialization and bring up window / fullscreen</span>
  367. 00349 <span class="comment"> *************************************************************************/</span>
  368. 00350 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a20">OsDoInitAPI</a>();
  369. 00351
  370. 00352 <span class="comment">/*!***********************************************************************</span>
  371. 00353 <span class="comment"> @Function OsDoReleaseAPI</span>
  372. 00354 <span class="comment"> @description Clean up after we're done</span>
  373. 00355 <span class="comment"> *************************************************************************/</span>
  374. 00356 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a21">OsDoReleaseAPI</a>();
  375. 00357
  376. 00358 <span class="comment">/*!***********************************************************************</span>
  377. 00359 <span class="comment"> @Function OsRenderComplete</span>
  378. 00360 <span class="comment"> @description Main message loop / render loop</span>
  379. 00361 <span class="comment"> *************************************************************************/</span>
  380. 00362 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a22">OsRenderComplete</a>();
  381. 00363
  382. 00364 <span class="comment">/*!***********************************************************************</span>
  383. 00365 <span class="comment"> @Function OsPixmapCopy</span>
  384. 00366 <span class="comment"> @description When using pixmaps, copy the render to the display</span>
  385. 00367 <span class="comment"> *************************************************************************/</span>
  386. 00368 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a23">OsPixmapCopy</a>();
  387. 00369
  388. 00370 <span class="comment">/*!***********************************************************************</span>
  389. 00371 <span class="comment"> @Function OsGetNativeDisplayType</span>
  390. 00372 <span class="comment"> @description Called from InitAPI() to get the NativeDisplayType</span>
  391. 00373 <span class="comment"> *************************************************************************/</span>
  392. 00374 <span class="keywordtype">void</span> *<a class="code" href="classPVRShellInit.html#a24">OsGetNativeDisplayType</a>();
  393. 00375
  394. 00376 <span class="comment">/*!***********************************************************************</span>
  395. 00377 <span class="comment"> @Function OsGetNativePixmapType</span>
  396. 00378 <span class="comment"> @description Called from InitAPI() to get the NativePixmapType</span>
  397. 00379 <span class="comment"> *************************************************************************/</span>
  398. 00380 <span class="keywordtype">void</span> *<a class="code" href="classPVRShellInit.html#a25">OsGetNativePixmapType</a>();
  399. 00381
  400. 00382 <span class="comment">/*!***********************************************************************</span>
  401. 00383 <span class="comment"> @Function OsGetNativeWindowType</span>
  402. 00384 <span class="comment"> @description Called from InitAPI() to get the NativeWindowType</span>
  403. 00385 <span class="comment"> *************************************************************************/</span>
  404. 00386 <span class="keywordtype">void</span> *<a class="code" href="classPVRShellInit.html#a26">OsGetNativeWindowType</a>();
  405. 00387
  406. 00388 <span class="comment">/*!***********************************************************************</span>
  407. 00389 <span class="comment"> @Function OsGet</span>
  408. 00390 <span class="comment"> @Input prefName Name of value to get</span>
  409. 00391 <span class="comment"> @Modified pn A pointer set to the value asked for</span>
  410. 00392 <span class="comment"> @Returns true on success</span>
  411. 00393 <span class="comment"> @Description Retrieves OS-specific data</span>
  412. 00394 <span class="comment"> *************************************************************************/</span>
  413. 00395 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a27">OsGet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keywordtype">int</span> *pn);
  414. 00396
  415. 00397 <span class="comment">/*!***********************************************************************</span>
  416. 00398 <span class="comment"> @Function OsGet</span>
  417. 00399 <span class="comment"> @Input prefName Name of value to get</span>
  418. 00400 <span class="comment"> @Modified pp A pointer set to the value asked for</span>
  419. 00401 <span class="comment"> @Returns true on success</span>
  420. 00402 <span class="comment"> @Description Retrieves OS-specific data</span>
  421. 00403 <span class="comment"> *************************************************************************/</span>
  422. 00404 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a27">OsGet</a>(<span class="keyword">const</span> prefNamePtrEnum prefName, <span class="keywordtype">void</span> **pp);
  423. 00405
  424. 00406 <span class="comment">/*!***********************************************************************</span>
  425. 00407 <span class="comment"> @Function OsSet</span>
  426. 00408 <span class="comment"> @Input prefName Name of value to set</span>
  427. 00409 <span class="comment"> @Input i32Value The value to set our named value to</span>
  428. 00410 <span class="comment"> @Returns true on success</span>
  429. 00411 <span class="comment"> @Description Sets OS-specific data</span>
  430. 00412 <span class="comment"> *************************************************************************/</span>
  431. 00413 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a29">OsSet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keyword">const</span> <span class="keywordtype">int</span> i32Value);
  432. 00414
  433. 00415 <span class="comment">/*!***********************************************************************</span>
  434. 00416 <span class="comment"> @Function OsDisplayDebugString</span>
  435. 00417 <span class="comment"> @Input str The debug string to display</span>
  436. 00418 <span class="comment"> @Description Prints a debug string</span>
  437. 00419 <span class="comment"> *************************************************************************/</span>
  438. 00420 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a30">OsDisplayDebugString</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> str);
  439. 00421
  440. 00422 <span class="comment">/*!***********************************************************************</span>
  441. 00423 <span class="comment"> @Function OsGetTime</span>
  442. 00424 <span class="comment"> @Description Gets the time in milliseconds</span>
  443. 00425 <span class="comment"> *************************************************************************/</span>
  444. 00426 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classPVRShellInit.html#a31">OsGetTime</a>();
  445. 00427
  446. 00428 <span class="comment">/*</span>
  447. 00429 <span class="comment"> API functionality</span>
  448. 00430 <span class="comment"> */</span>
  449. 00431 <span class="comment">/*!***********************************************************************</span>
  450. 00432 <span class="comment"> @Function ApiInitAPI</span>
  451. 00433 <span class="comment"> @description Initialisation for API-specific code.</span>
  452. 00434 <span class="comment"> *************************************************************************/</span>
  453. 00435 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a32">ApiInitAPI</a>();
  454. 00436
  455. 00437 <span class="comment">/*!***********************************************************************</span>
  456. 00438 <span class="comment"> @Function ApiReleaseAPI</span>
  457. 00439 <span class="comment"> @description Releases all resources allocated by the API.</span>
  458. 00440 <span class="comment"> *************************************************************************/</span>
  459. 00441 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a33">ApiReleaseAPI</a>();
  460. 00442
  461. 00443 <span class="comment">/*!***********************************************************************</span>
  462. 00444 <span class="comment"> @Function ApiScreenCaptureBuffer</span>
  463. 00445 <span class="comment"> @Input Width Width of the region to capture</span>
  464. 00446 <span class="comment"> @Input Height Height of the region to capture</span>
  465. 00447 <span class="comment"> @Modified pBuf A buffer to put the screen capture into</span>
  466. 00448 <span class="comment"> @description API-specific function to store the current content of the</span>
  467. 00449 <span class="comment"> FrameBuffer into the memory allocated by the user.</span>
  468. 00450 <span class="comment"> *************************************************************************/</span>
  469. 00451 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a34">ApiScreenCaptureBuffer</a>(<span class="keywordtype">int</span> Width,<span class="keywordtype">int</span> Height,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pBuf);
  470. 00452
  471. 00453 <span class="comment">/*!***********************************************************************</span>
  472. 00454 <span class="comment"> @Function ApiRenderComplete</span>
  473. 00455 <span class="comment"> @description Perform API operations required after a frame has finished (e.g., flipping).</span>
  474. 00456 <span class="comment"> *************************************************************************/</span>
  475. 00457 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a35">ApiRenderComplete</a>();
  476. 00458
  477. 00459 <span class="comment">/*!***********************************************************************</span>
  478. 00460 <span class="comment"> @Function ApiSet</span>
  479. 00461 <span class="comment"> @Input prefName Name of value to set</span>
  480. 00462 <span class="comment"> @Modified i32Value Value to set it to</span>
  481. 00463 <span class="comment"> @description Set parameters which are specific to the API.</span>
  482. 00464 <span class="comment"> *************************************************************************/</span>
  483. 00465 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a36">ApiSet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keyword">const</span> <span class="keywordtype">int</span> i32Value);
  484. 00466
  485. 00467 <span class="comment">/*!***********************************************************************</span>
  486. 00468 <span class="comment"> @Function ApiGet</span>
  487. 00469 <span class="comment"> @Input prefName Name of value to get</span>
  488. 00470 <span class="comment"> @Modified pn A pointer set to the value asked for</span>
  489. 00471 <span class="comment"> @description Get parameters which are specific to the API.</span>
  490. 00472 <span class="comment"> *************************************************************************/</span>
  491. 00473 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a37">ApiGet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keywordtype">int</span> *pn);
  492. 00474
  493. 00475 <span class="comment">/*!***********************************************************************</span>
  494. 00476 <span class="comment"> @Function ApiGet</span>
  495. 00477 <span class="comment"> @Input prefName Name of value to get</span>
  496. 00478 <span class="comment"> @Modified pp A pointer set to the value asked for</span>
  497. 00479 <span class="comment"> @description Get parameters which are specific to the API.</span>
  498. 00480 <span class="comment"> *************************************************************************/</span>
  499. 00481 <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a37">ApiGet</a>(<span class="keyword">const</span> prefNamePtrEnum prefName, <span class="keywordtype">void</span> **pp);
  500. 00482
  501. 00483 <span class="comment">/*!***********************************************************************</span>
  502. 00484 <span class="comment"> @Function ApiActivatePreferences</span>
  503. 00485 <span class="comment"> @description Run specific API code to perform the operations requested in preferences.</span>
  504. 00486 <span class="comment"> *************************************************************************/</span>
  505. 00487 <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a39">ApiActivatePreferences</a>();
  506. 00488 };
  507. 00489
  508. 00490 <span class="preprocessor">#endif </span><span class="comment">/* __PVRSHELLIMPL_H_ */</span>
  509. 00491
  510. 00492 <span class="comment">/*****************************************************************************</span>
  511. 00493 <span class="comment"> End of file (PVRShellImpl.h)</span>
  512. 00494 <span class="comment">*****************************************************************************/</span>
  513. 00495
  514. 00496
  515. </pre></div><br>
  516. <br>
  517. <P align=left><FONT size=2><STRONG><A
  518. href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> ©
  519. 1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
  520. <hr>
  521. <address style="align: left;"><small><FONT color=f0f>
  522. Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
  523. </body>
  524. </html>