Platformer in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

416 lines
26 KiB

5 years ago
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.14"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>0.9.9 API documenation: Floating-Point Pack and Unpack Functions</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
  24. <td id="projectalign" style="padding-left: 0.5em;">
  25. <div id="projectname">0.9.9 API documenation
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.14 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. </div><!-- top -->
  50. <!-- window showing the filter options -->
  51. <div id="MSearchSelectWindow"
  52. onmouseover="return searchBox.OnSearchSelectShow()"
  53. onmouseout="return searchBox.OnSearchSelectHide()"
  54. onkeydown="return searchBox.OnSearchSelectKey(event)">
  55. </div>
  56. <!-- iframe showing the search results (closed by default) -->
  57. <div id="MSearchResultsWindow">
  58. <iframe src="javascript:void(0)" frameborder="0"
  59. name="MSearchResults" id="MSearchResults">
  60. </iframe>
  61. </div>
  62. <div class="header">
  63. <div class="summary">
  64. <a href="#func-members">Functions</a> </div>
  65. <div class="headertitle">
  66. <div class="title">Floating-Point Pack and Unpack Functions<div class="ingroups"><a class="el" href="a00698.html">Core features</a></div></div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <table class="memberdecls">
  70. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  71. Functions</h2></td></tr>
  72. <tr class="memitem:gaa916ca426b2bb0343ba17e3753e245c2"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#gaa916ca426b2bb0343ba17e3753e245c2">packDouble2x32</a> (<a class="el" href="a00699.html#ga2f6d9ec3ae14813ade37d6aee3715fdb">uvec2</a> const &amp;v)</td></tr>
  73. <tr class="separator:gaa916ca426b2bb0343ba17e3753e245c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  74. <tr class="memitem:ga20f134b07db3a3d3a38efb2617388c92"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga20f134b07db3a3d3a38efb2617388c92">packHalf2x16</a> (<a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;v)</td></tr>
  75. <tr class="separator:ga20f134b07db3a3d3a38efb2617388c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
  76. <tr class="memitem:ga977ab172da5494e5ac63e952afacfbe2"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga977ab172da5494e5ac63e952afacfbe2">packSnorm2x16</a> (<a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;v)</td></tr>
  77. <tr class="separator:ga977ab172da5494e5ac63e952afacfbe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:ga85e8f17627516445026ab7a9c2e3531a"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga85e8f17627516445026ab7a9c2e3531a">packSnorm4x8</a> (<a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;v)</td></tr>
  79. <tr class="separator:ga85e8f17627516445026ab7a9c2e3531a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. <tr class="memitem:ga0e2d107039fe608a209497af867b85fb"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga0e2d107039fe608a209497af867b85fb">packUnorm2x16</a> (<a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;v)</td></tr>
  81. <tr class="separator:ga0e2d107039fe608a209497af867b85fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:gaf7d2f7341a9eeb4a436929d6f9ad08f2"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#gaf7d2f7341a9eeb4a436929d6f9ad08f2">packUnorm4x8</a> (<a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;v)</td></tr>
  83. <tr class="separator:gaf7d2f7341a9eeb4a436929d6f9ad08f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:ga5f4296dc5f12f0aa67ac05b8bb322483"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00699.html#ga2f6d9ec3ae14813ade37d6aee3715fdb">uvec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga5f4296dc5f12f0aa67ac05b8bb322483">unpackDouble2x32</a> (double v)</td></tr>
  85. <tr class="separator:ga5f4296dc5f12f0aa67ac05b8bb322483"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:gaf59b52e6b28da9335322c4ae19b5d745"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#gaf59b52e6b28da9335322c4ae19b5d745">unpackHalf2x16</a> (uint v)</td></tr>
  87. <tr class="separator:gaf59b52e6b28da9335322c4ae19b5d745"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:gacd8f8971a3fe28418be0d0fa1f786b38"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#gacd8f8971a3fe28418be0d0fa1f786b38">unpackSnorm2x16</a> (uint p)</td></tr>
  89. <tr class="separator:gacd8f8971a3fe28418be0d0fa1f786b38"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:ga2db488646d48b7c43d3218954523fe82"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga2db488646d48b7c43d3218954523fe82">unpackSnorm4x8</a> (uint p)</td></tr>
  91. <tr class="separator:ga2db488646d48b7c43d3218954523fe82"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:ga1f66188e5d65afeb9ffba1ad971e4007"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga1f66188e5d65afeb9ffba1ad971e4007">unpackUnorm2x16</a> (uint p)</td></tr>
  93. <tr class="separator:ga1f66188e5d65afeb9ffba1ad971e4007"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:ga7f903259150b67e9466f5f8edffcd197"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00789.html#ga7f903259150b67e9466f5f8edffcd197">unpackUnorm4x8</a> (uint p)</td></tr>
  95. <tr class="separator:ga7f903259150b67e9466f5f8edffcd197"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. </table>
  97. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  98. <p>Provides GLSL functions to pack and unpack half, single and double-precision floating point values into more compact integer types. </p>
  99. <p>These functions do not operate component-wise, rather as described in each case.</p>
  100. <p>Include &lt;<a class="el" href="a00416.html" title="Core features ">glm/packing.hpp</a>&gt; to use these core features. </p>
  101. <h2 class="groupheader">Function Documentation</h2>
  102. <a id="gaa916ca426b2bb0343ba17e3753e245c2"></a>
  103. <h2 class="memtitle"><span class="permalink"><a href="#gaa916ca426b2bb0343ba17e3753e245c2">&#9670;&nbsp;</a></span>packDouble2x32()</h2>
  104. <div class="memitem">
  105. <div class="memproto">
  106. <table class="memname">
  107. <tr>
  108. <td class="memname">GLM_FUNC_DECL double glm::packDouble2x32 </td>
  109. <td>(</td>
  110. <td class="paramtype"><a class="el" href="a00699.html#ga2f6d9ec3ae14813ade37d6aee3715fdb">uvec2</a> const &amp;&#160;</td>
  111. <td class="paramname"><em>v</em></td><td>)</td>
  112. <td></td>
  113. </tr>
  114. </table>
  115. </div><div class="memdoc">
  116. <p>Returns a double-qualifier value obtained by packing the components of v into a 64-bit value. </p>
  117. <p>If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit- level representation of v is preserved. The first vector component specifies the 32 least significant bits; the second component specifies the 32 most significant bits.</p>
  118. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml">GLSL packDouble2x32 man page</a> </dd>
  119. <dd>
  120. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  121. </div>
  122. </div>
  123. <a id="ga20f134b07db3a3d3a38efb2617388c92"></a>
  124. <h2 class="memtitle"><span class="permalink"><a href="#ga20f134b07db3a3d3a38efb2617388c92">&#9670;&nbsp;</a></span>packHalf2x16()</h2>
  125. <div class="memitem">
  126. <div class="memproto">
  127. <table class="memname">
  128. <tr>
  129. <td class="memname">GLM_FUNC_DECL uint glm::packHalf2x16 </td>
  130. <td>(</td>
  131. <td class="paramtype"><a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;&#160;</td>
  132. <td class="paramname"><em>v</em></td><td>)</td>
  133. <td></td>
  134. </tr>
  135. </table>
  136. </div><div class="memdoc">
  137. <p>Returns an unsigned integer obtained by converting the components of a two-component floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification, and then packing these two 16- bit integers into a 32-bit unsigned integer. </p>
  138. <p>The first vector component specifies the 16 least-significant bits of the result; the second component specifies the 16 most-significant bits.</p>
  139. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> </dd>
  140. <dd>
  141. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  142. </div>
  143. </div>
  144. <a id="ga977ab172da5494e5ac63e952afacfbe2"></a>
  145. <h2 class="memtitle"><span class="permalink"><a href="#ga977ab172da5494e5ac63e952afacfbe2">&#9670;&nbsp;</a></span>packSnorm2x16()</h2>
  146. <div class="memitem">
  147. <div class="memproto">
  148. <table class="memname">
  149. <tr>
  150. <td class="memname">GLM_FUNC_DECL uint glm::packSnorm2x16 </td>
  151. <td>(</td>
  152. <td class="paramtype"><a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;&#160;</td>
  153. <td class="paramname"><em>v</em></td><td>)</td>
  154. <td></td>
  155. </tr>
  156. </table>
  157. </div><div class="memdoc">
  158. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  159. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  160. <p>The conversion for component c of v to fixed point is done as follows: packSnorm2x16: round(clamp(v, -1, +1) * 32767.0)</p>
  161. <p>The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.</p>
  162. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml">GLSL packSnorm2x16 man page</a> </dd>
  163. <dd>
  164. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  165. </div>
  166. </div>
  167. <a id="ga85e8f17627516445026ab7a9c2e3531a"></a>
  168. <h2 class="memtitle"><span class="permalink"><a href="#ga85e8f17627516445026ab7a9c2e3531a">&#9670;&nbsp;</a></span>packSnorm4x8()</h2>
  169. <div class="memitem">
  170. <div class="memproto">
  171. <table class="memname">
  172. <tr>
  173. <td class="memname">GLM_FUNC_DECL uint glm::packSnorm4x8 </td>
  174. <td>(</td>
  175. <td class="paramtype"><a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;&#160;</td>
  176. <td class="paramname"><em>v</em></td><td>)</td>
  177. <td></td>
  178. </tr>
  179. </table>
  180. </div><div class="memdoc">
  181. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  182. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  183. <p>The conversion for component c of v to fixed point is done as follows: packSnorm4x8: round(clamp(c, -1, +1) * 127.0)</p>
  184. <p>The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.</p>
  185. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> </dd>
  186. <dd>
  187. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  188. </div>
  189. </div>
  190. <a id="ga0e2d107039fe608a209497af867b85fb"></a>
  191. <h2 class="memtitle"><span class="permalink"><a href="#ga0e2d107039fe608a209497af867b85fb">&#9670;&nbsp;</a></span>packUnorm2x16()</h2>
  192. <div class="memitem">
  193. <div class="memproto">
  194. <table class="memname">
  195. <tr>
  196. <td class="memname">GLM_FUNC_DECL uint glm::packUnorm2x16 </td>
  197. <td>(</td>
  198. <td class="paramtype"><a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;&#160;</td>
  199. <td class="paramname"><em>v</em></td><td>)</td>
  200. <td></td>
  201. </tr>
  202. </table>
  203. </div><div class="memdoc">
  204. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  205. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  206. <p>The conversion for component c of v to fixed point is done as follows: packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)</p>
  207. <p>The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.</p>
  208. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml">GLSL packUnorm2x16 man page</a> </dd>
  209. <dd>
  210. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  211. </div>
  212. </div>
  213. <a id="gaf7d2f7341a9eeb4a436929d6f9ad08f2"></a>
  214. <h2 class="memtitle"><span class="permalink"><a href="#gaf7d2f7341a9eeb4a436929d6f9ad08f2">&#9670;&nbsp;</a></span>packUnorm4x8()</h2>
  215. <div class="memitem">
  216. <div class="memproto">
  217. <table class="memname">
  218. <tr>
  219. <td class="memname">GLM_FUNC_DECL uint glm::packUnorm4x8 </td>
  220. <td>(</td>
  221. <td class="paramtype"><a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;&#160;</td>
  222. <td class="paramname"><em>v</em></td><td>)</td>
  223. <td></td>
  224. </tr>
  225. </table>
  226. </div><div class="memdoc">
  227. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  228. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  229. <p>The conversion for component c of v to fixed point is done as follows: packUnorm4x8: round(clamp(c, 0, +1) * 255.0)</p>
  230. <p>The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.</p>
  231. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> </dd>
  232. <dd>
  233. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  234. </div>
  235. </div>
  236. <a id="ga5f4296dc5f12f0aa67ac05b8bb322483"></a>
  237. <h2 class="memtitle"><span class="permalink"><a href="#ga5f4296dc5f12f0aa67ac05b8bb322483">&#9670;&nbsp;</a></span>unpackDouble2x32()</h2>
  238. <div class="memitem">
  239. <div class="memproto">
  240. <table class="memname">
  241. <tr>
  242. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00699.html#ga2f6d9ec3ae14813ade37d6aee3715fdb">uvec2</a> glm::unpackDouble2x32 </td>
  243. <td>(</td>
  244. <td class="paramtype">double&#160;</td>
  245. <td class="paramname"><em>v</em></td><td>)</td>
  246. <td></td>
  247. </tr>
  248. </table>
  249. </div><div class="memdoc">
  250. <p>Returns a two-component unsigned integer vector representation of v. </p>
  251. <p>The bit-level representation of v is preserved. The first component of the vector contains the 32 least significant bits of the double; the second component consists the 32 most significant bits.</p>
  252. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a> </dd>
  253. <dd>
  254. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  255. </div>
  256. </div>
  257. <a id="gaf59b52e6b28da9335322c4ae19b5d745"></a>
  258. <h2 class="memtitle"><span class="permalink"><a href="#gaf59b52e6b28da9335322c4ae19b5d745">&#9670;&nbsp;</a></span>unpackHalf2x16()</h2>
  259. <div class="memitem">
  260. <div class="memproto">
  261. <table class="memname">
  262. <tr>
  263. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> glm::unpackHalf2x16 </td>
  264. <td>(</td>
  265. <td class="paramtype">uint&#160;</td>
  266. <td class="paramname"><em>v</em></td><td>)</td>
  267. <td></td>
  268. </tr>
  269. </table>
  270. </div><div class="memdoc">
  271. <p>Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, and converting them to 32-bit floating-point values. </p>
  272. <p>The first component of the vector is obtained from the 16 least-significant bits of v; the second component is obtained from the 16 most-significant bits of v.</p>
  273. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a> </dd>
  274. <dd>
  275. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  276. </div>
  277. </div>
  278. <a id="gacd8f8971a3fe28418be0d0fa1f786b38"></a>
  279. <h2 class="memtitle"><span class="permalink"><a href="#gacd8f8971a3fe28418be0d0fa1f786b38">&#9670;&nbsp;</a></span>unpackSnorm2x16()</h2>
  280. <div class="memitem">
  281. <div class="memproto">
  282. <table class="memname">
  283. <tr>
  284. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> glm::unpackSnorm2x16 </td>
  285. <td>(</td>
  286. <td class="paramtype">uint&#160;</td>
  287. <td class="paramname"><em>p</em></td><td>)</td>
  288. <td></td>
  289. </tr>
  290. </table>
  291. </div><div class="memdoc">
  292. <p>First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. </p>
  293. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  294. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm2x16: clamp(f / 32767.0, -1, +1)</p>
  295. <p>The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.</p>
  296. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a> </dd>
  297. <dd>
  298. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  299. </div>
  300. </div>
  301. <a id="ga2db488646d48b7c43d3218954523fe82"></a>
  302. <h2 class="memtitle"><span class="permalink"><a href="#ga2db488646d48b7c43d3218954523fe82">&#9670;&nbsp;</a></span>unpackSnorm4x8()</h2>
  303. <div class="memitem">
  304. <div class="memproto">
  305. <table class="memname">
  306. <tr>
  307. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> glm::unpackSnorm4x8 </td>
  308. <td>(</td>
  309. <td class="paramtype">uint&#160;</td>
  310. <td class="paramname"><em>p</em></td><td>)</td>
  311. <td></td>
  312. </tr>
  313. </table>
  314. </div><div class="memdoc">
  315. <p>First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. </p>
  316. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  317. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm4x8: clamp(f / 127.0, -1, +1)</p>
  318. <p>The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.</p>
  319. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> </dd>
  320. <dd>
  321. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  322. </div>
  323. </div>
  324. <a id="ga1f66188e5d65afeb9ffba1ad971e4007"></a>
  325. <h2 class="memtitle"><span class="permalink"><a href="#ga1f66188e5d65afeb9ffba1ad971e4007">&#9670;&nbsp;</a></span>unpackUnorm2x16()</h2>
  326. <div class="memitem">
  327. <div class="memproto">
  328. <table class="memname">
  329. <tr>
  330. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00699.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> glm::unpackUnorm2x16 </td>
  331. <td>(</td>
  332. <td class="paramtype">uint&#160;</td>
  333. <td class="paramname"><em>p</em></td><td>)</td>
  334. <td></td>
  335. </tr>
  336. </table>
  337. </div><div class="memdoc">
  338. <p>First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. </p>
  339. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  340. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm2x16: f / 65535.0</p>
  341. <p>The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.</p>
  342. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a> </dd>
  343. <dd>
  344. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  345. </div>
  346. </div>
  347. <a id="ga7f903259150b67e9466f5f8edffcd197"></a>
  348. <h2 class="memtitle"><span class="permalink"><a href="#ga7f903259150b67e9466f5f8edffcd197">&#9670;&nbsp;</a></span>unpackUnorm4x8()</h2>
  349. <div class="memitem">
  350. <div class="memproto">
  351. <table class="memname">
  352. <tr>
  353. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00699.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> glm::unpackUnorm4x8 </td>
  354. <td>(</td>
  355. <td class="paramtype">uint&#160;</td>
  356. <td class="paramname"><em>p</em></td><td>)</td>
  357. <td></td>
  358. </tr>
  359. </table>
  360. </div><div class="memdoc">
  361. <p>First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. </p>
  362. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  363. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0</p>
  364. <p>The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.</p>
  365. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> </dd>
  366. <dd>
  367. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> </dd></dl>
  368. </div>
  369. </div>
  370. </div><!-- contents -->
  371. <!-- start footer part -->
  372. <hr class="footer"/><address class="footer"><small>
  373. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  374. <img class="footer" src="doxygen.png" alt="doxygen"/>
  375. </a> 1.8.14
  376. </small></address>
  377. </body>
  378. </html>