a00994.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.18"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>1.0.2 API documentation: 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">1.0.2 API documentation
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.18 -->
  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="a00898.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="a00994.html#gaa916ca426b2bb0343ba17e3753e245c2">packDouble2x32</a> (<a class="el" href="a00899.html#gab173892ee0fd88db1e13a17b1d861326">uvec2</a> const &amp;v)</td></tr>
  73. <tr class="memdesc:gaa916ca426b2bb0343ba17e3753e245c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a double-qualifier value obtained by packing the components of v into a 64-bit value. <a href="a00994.html#gaa916ca426b2bb0343ba17e3753e245c2">More...</a><br /></td></tr>
  74. <tr class="separator:gaa916ca426b2bb0343ba17e3753e245c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <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="a00994.html#ga20f134b07db3a3d3a38efb2617388c92">packHalf2x16</a> (<a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;v)</td></tr>
  76. <tr class="memdesc:ga20f134b07db3a3d3a38efb2617388c92"><td class="mdescLeft">&#160;</td><td class="mdescRight">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. <a href="a00994.html#ga20f134b07db3a3d3a38efb2617388c92">More...</a><br /></td></tr>
  77. <tr class="separator:ga20f134b07db3a3d3a38efb2617388c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <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="a00994.html#ga977ab172da5494e5ac63e952afacfbe2">packSnorm2x16</a> (<a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;v)</td></tr>
  79. <tr class="memdesc:ga977ab172da5494e5ac63e952afacfbe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. <a href="a00994.html#ga977ab172da5494e5ac63e952afacfbe2">More...</a><br /></td></tr>
  80. <tr class="separator:ga977ab172da5494e5ac63e952afacfbe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <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="a00994.html#ga85e8f17627516445026ab7a9c2e3531a">packSnorm4x8</a> (<a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;v)</td></tr>
  82. <tr class="memdesc:ga85e8f17627516445026ab7a9c2e3531a"><td class="mdescLeft">&#160;</td><td class="mdescRight">First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. <a href="a00994.html#ga85e8f17627516445026ab7a9c2e3531a">More...</a><br /></td></tr>
  83. <tr class="separator:ga85e8f17627516445026ab7a9c2e3531a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <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="a00994.html#ga0e2d107039fe608a209497af867b85fb">packUnorm2x16</a> (<a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;v)</td></tr>
  85. <tr class="memdesc:ga0e2d107039fe608a209497af867b85fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. <a href="a00994.html#ga0e2d107039fe608a209497af867b85fb">More...</a><br /></td></tr>
  86. <tr class="separator:ga0e2d107039fe608a209497af867b85fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <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="a00994.html#gaf7d2f7341a9eeb4a436929d6f9ad08f2">packUnorm4x8</a> (<a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;v)</td></tr>
  88. <tr class="memdesc:gaf7d2f7341a9eeb4a436929d6f9ad08f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. <a href="a00994.html#gaf7d2f7341a9eeb4a436929d6f9ad08f2">More...</a><br /></td></tr>
  89. <tr class="separator:gaf7d2f7341a9eeb4a436929d6f9ad08f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:ga5f4296dc5f12f0aa67ac05b8bb322483"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00899.html#gab173892ee0fd88db1e13a17b1d861326">uvec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00994.html#ga5f4296dc5f12f0aa67ac05b8bb322483">unpackDouble2x32</a> (double v)</td></tr>
  91. <tr class="memdesc:ga5f4296dc5f12f0aa67ac05b8bb322483"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a two-component unsigned integer vector representation of v. <a href="a00994.html#ga5f4296dc5f12f0aa67ac05b8bb322483">More...</a><br /></td></tr>
  92. <tr class="separator:ga5f4296dc5f12f0aa67ac05b8bb322483"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:gaf59b52e6b28da9335322c4ae19b5d745"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00994.html#gaf59b52e6b28da9335322c4ae19b5d745">unpackHalf2x16</a> (uint v)</td></tr>
  94. <tr class="memdesc:gaf59b52e6b28da9335322c4ae19b5d745"><td class="mdescLeft">&#160;</td><td class="mdescRight">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. <a href="a00994.html#gaf59b52e6b28da9335322c4ae19b5d745">More...</a><br /></td></tr>
  95. <tr class="separator:gaf59b52e6b28da9335322c4ae19b5d745"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:gacd8f8971a3fe28418be0d0fa1f786b38"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00994.html#gacd8f8971a3fe28418be0d0fa1f786b38">unpackSnorm2x16</a> (uint p)</td></tr>
  97. <tr class="memdesc:gacd8f8971a3fe28418be0d0fa1f786b38"><td class="mdescLeft">&#160;</td><td class="mdescRight">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. <a href="a00994.html#gacd8f8971a3fe28418be0d0fa1f786b38">More...</a><br /></td></tr>
  98. <tr class="separator:gacd8f8971a3fe28418be0d0fa1f786b38"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:ga2db488646d48b7c43d3218954523fe82"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00994.html#ga2db488646d48b7c43d3218954523fe82">unpackSnorm4x8</a> (uint p)</td></tr>
  100. <tr class="memdesc:ga2db488646d48b7c43d3218954523fe82"><td class="mdescLeft">&#160;</td><td class="mdescRight">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. <a href="a00994.html#ga2db488646d48b7c43d3218954523fe82">More...</a><br /></td></tr>
  101. <tr class="separator:ga2db488646d48b7c43d3218954523fe82"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:ga1f66188e5d65afeb9ffba1ad971e4007"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00994.html#ga1f66188e5d65afeb9ffba1ad971e4007">unpackUnorm2x16</a> (uint p)</td></tr>
  103. <tr class="memdesc:ga1f66188e5d65afeb9ffba1ad971e4007"><td class="mdescLeft">&#160;</td><td class="mdescRight">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. <a href="a00994.html#ga1f66188e5d65afeb9ffba1ad971e4007">More...</a><br /></td></tr>
  104. <tr class="separator:ga1f66188e5d65afeb9ffba1ad971e4007"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:ga7f903259150b67e9466f5f8edffcd197"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL <a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00994.html#ga7f903259150b67e9466f5f8edffcd197">unpackUnorm4x8</a> (uint p)</td></tr>
  106. <tr class="memdesc:ga7f903259150b67e9466f5f8edffcd197"><td class="mdescLeft">&#160;</td><td class="mdescRight">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. <a href="a00994.html#ga7f903259150b67e9466f5f8edffcd197">More...</a><br /></td></tr>
  107. <tr class="separator:ga7f903259150b67e9466f5f8edffcd197"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. </table>
  109. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  110. <p>Provides GLSL functions to pack and unpack half, single and double-precision floating point values into more compact integer types.</p>
  111. <p>These functions do not operate component-wise, rather as described in each case.</p>
  112. <p>Include &lt;<a class="el" href="a00557.html" title="Core features">glm/packing.hpp</a>&gt; to use these core features. </p>
  113. <h2 class="groupheader">Function Documentation</h2>
  114. <a id="gaa916ca426b2bb0343ba17e3753e245c2"></a>
  115. <h2 class="memtitle"><span class="permalink"><a href="#gaa916ca426b2bb0343ba17e3753e245c2">&#9670;&nbsp;</a></span>packDouble2x32()</h2>
  116. <div class="memitem">
  117. <div class="memproto">
  118. <table class="memname">
  119. <tr>
  120. <td class="memname">GLM_FUNC_DECL double glm::packDouble2x32 </td>
  121. <td>(</td>
  122. <td class="paramtype"><a class="el" href="a00899.html#gab173892ee0fd88db1e13a17b1d861326">uvec2</a> const &amp;&#160;</td>
  123. <td class="paramname"><em>v</em></td><td>)</td>
  124. <td></td>
  125. </tr>
  126. </table>
  127. </div><div class="memdoc">
  128. <p>Returns a double-qualifier value obtained by packing the components of v into a 64-bit value. </p>
  129. <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>
  130. <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>
  131. <dd>
  132. <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>
  133. </div>
  134. </div>
  135. <a id="ga20f134b07db3a3d3a38efb2617388c92"></a>
  136. <h2 class="memtitle"><span class="permalink"><a href="#ga20f134b07db3a3d3a38efb2617388c92">&#9670;&nbsp;</a></span>packHalf2x16()</h2>
  137. <div class="memitem">
  138. <div class="memproto">
  139. <table class="memname">
  140. <tr>
  141. <td class="memname">GLM_FUNC_DECL uint glm::packHalf2x16 </td>
  142. <td>(</td>
  143. <td class="paramtype"><a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;&#160;</td>
  144. <td class="paramname"><em>v</em></td><td>)</td>
  145. <td></td>
  146. </tr>
  147. </table>
  148. </div><div class="memdoc">
  149. <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>
  150. <p>The first vector component specifies the 16 least-significant bits of the result; the second component specifies the 16 most-significant bits.</p>
  151. <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>
  152. <dd>
  153. <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>
  154. </div>
  155. </div>
  156. <a id="ga977ab172da5494e5ac63e952afacfbe2"></a>
  157. <h2 class="memtitle"><span class="permalink"><a href="#ga977ab172da5494e5ac63e952afacfbe2">&#9670;&nbsp;</a></span>packSnorm2x16()</h2>
  158. <div class="memitem">
  159. <div class="memproto">
  160. <table class="memname">
  161. <tr>
  162. <td class="memname">GLM_FUNC_DECL uint glm::packSnorm2x16 </td>
  163. <td>(</td>
  164. <td class="paramtype"><a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;&#160;</td>
  165. <td class="paramname"><em>v</em></td><td>)</td>
  166. <td></td>
  167. </tr>
  168. </table>
  169. </div><div class="memdoc">
  170. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  171. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  172. <p>The conversion for component c of v to fixed point is done as follows: packSnorm2x16: round(clamp(v, -1, +1) * 32767.0)</p>
  173. <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>
  174. <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>
  175. <dd>
  176. <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>
  177. </div>
  178. </div>
  179. <a id="ga85e8f17627516445026ab7a9c2e3531a"></a>
  180. <h2 class="memtitle"><span class="permalink"><a href="#ga85e8f17627516445026ab7a9c2e3531a">&#9670;&nbsp;</a></span>packSnorm4x8()</h2>
  181. <div class="memitem">
  182. <div class="memproto">
  183. <table class="memname">
  184. <tr>
  185. <td class="memname">GLM_FUNC_DECL uint glm::packSnorm4x8 </td>
  186. <td>(</td>
  187. <td class="paramtype"><a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;&#160;</td>
  188. <td class="paramname"><em>v</em></td><td>)</td>
  189. <td></td>
  190. </tr>
  191. </table>
  192. </div><div class="memdoc">
  193. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  194. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  195. <p>The conversion for component c of v to fixed point is done as follows: packSnorm4x8: round(clamp(c, -1, +1) * 127.0)</p>
  196. <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>
  197. <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>
  198. <dd>
  199. <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>
  200. </div>
  201. </div>
  202. <a id="ga0e2d107039fe608a209497af867b85fb"></a>
  203. <h2 class="memtitle"><span class="permalink"><a href="#ga0e2d107039fe608a209497af867b85fb">&#9670;&nbsp;</a></span>packUnorm2x16()</h2>
  204. <div class="memitem">
  205. <div class="memproto">
  206. <table class="memname">
  207. <tr>
  208. <td class="memname">GLM_FUNC_DECL uint glm::packUnorm2x16 </td>
  209. <td>(</td>
  210. <td class="paramtype"><a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> const &amp;&#160;</td>
  211. <td class="paramname"><em>v</em></td><td>)</td>
  212. <td></td>
  213. </tr>
  214. </table>
  215. </div><div class="memdoc">
  216. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  217. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  218. <p>The conversion for component c of v to fixed point is done as follows: packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)</p>
  219. <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>
  220. <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>
  221. <dd>
  222. <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>
  223. </div>
  224. </div>
  225. <a id="gaf7d2f7341a9eeb4a436929d6f9ad08f2"></a>
  226. <h2 class="memtitle"><span class="permalink"><a href="#gaf7d2f7341a9eeb4a436929d6f9ad08f2">&#9670;&nbsp;</a></span>packUnorm4x8()</h2>
  227. <div class="memitem">
  228. <div class="memproto">
  229. <table class="memname">
  230. <tr>
  231. <td class="memname">GLM_FUNC_DECL uint glm::packUnorm4x8 </td>
  232. <td>(</td>
  233. <td class="paramtype"><a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> const &amp;&#160;</td>
  234. <td class="paramname"><em>v</em></td><td>)</td>
  235. <td></td>
  236. </tr>
  237. </table>
  238. </div><div class="memdoc">
  239. <p>First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. </p>
  240. <p>Then, the results are packed into the returned 32-bit unsigned integer.</p>
  241. <p>The conversion for component c of v to fixed point is done as follows: packUnorm4x8: round(clamp(c, 0, +1) * 255.0)</p>
  242. <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>
  243. <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>
  244. <dd>
  245. <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>
  246. </div>
  247. </div>
  248. <a id="ga5f4296dc5f12f0aa67ac05b8bb322483"></a>
  249. <h2 class="memtitle"><span class="permalink"><a href="#ga5f4296dc5f12f0aa67ac05b8bb322483">&#9670;&nbsp;</a></span>unpackDouble2x32()</h2>
  250. <div class="memitem">
  251. <div class="memproto">
  252. <table class="memname">
  253. <tr>
  254. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00899.html#gab173892ee0fd88db1e13a17b1d861326">uvec2</a> glm::unpackDouble2x32 </td>
  255. <td>(</td>
  256. <td class="paramtype">double&#160;</td>
  257. <td class="paramname"><em>v</em></td><td>)</td>
  258. <td></td>
  259. </tr>
  260. </table>
  261. </div><div class="memdoc">
  262. <p>Returns a two-component unsigned integer vector representation of v. </p>
  263. <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>
  264. <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>
  265. <dd>
  266. <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>
  267. </div>
  268. </div>
  269. <a id="gaf59b52e6b28da9335322c4ae19b5d745"></a>
  270. <h2 class="memtitle"><span class="permalink"><a href="#gaf59b52e6b28da9335322c4ae19b5d745">&#9670;&nbsp;</a></span>unpackHalf2x16()</h2>
  271. <div class="memitem">
  272. <div class="memproto">
  273. <table class="memname">
  274. <tr>
  275. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> glm::unpackHalf2x16 </td>
  276. <td>(</td>
  277. <td class="paramtype">uint&#160;</td>
  278. <td class="paramname"><em>v</em></td><td>)</td>
  279. <td></td>
  280. </tr>
  281. </table>
  282. </div><div class="memdoc">
  283. <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>
  284. <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>
  285. <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>
  286. <dd>
  287. <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>
  288. </div>
  289. </div>
  290. <a id="gacd8f8971a3fe28418be0d0fa1f786b38"></a>
  291. <h2 class="memtitle"><span class="permalink"><a href="#gacd8f8971a3fe28418be0d0fa1f786b38">&#9670;&nbsp;</a></span>unpackSnorm2x16()</h2>
  292. <div class="memitem">
  293. <div class="memproto">
  294. <table class="memname">
  295. <tr>
  296. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> glm::unpackSnorm2x16 </td>
  297. <td>(</td>
  298. <td class="paramtype">uint&#160;</td>
  299. <td class="paramname"><em>p</em></td><td>)</td>
  300. <td></td>
  301. </tr>
  302. </table>
  303. </div><div class="memdoc">
  304. <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>
  305. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  306. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm2x16: clamp(f / 32767.0, -1, +1)</p>
  307. <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>
  308. <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>
  309. <dd>
  310. <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>
  311. </div>
  312. </div>
  313. <a id="ga2db488646d48b7c43d3218954523fe82"></a>
  314. <h2 class="memtitle"><span class="permalink"><a href="#ga2db488646d48b7c43d3218954523fe82">&#9670;&nbsp;</a></span>unpackSnorm4x8()</h2>
  315. <div class="memitem">
  316. <div class="memproto">
  317. <table class="memname">
  318. <tr>
  319. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> glm::unpackSnorm4x8 </td>
  320. <td>(</td>
  321. <td class="paramtype">uint&#160;</td>
  322. <td class="paramname"><em>p</em></td><td>)</td>
  323. <td></td>
  324. </tr>
  325. </table>
  326. </div><div class="memdoc">
  327. <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>
  328. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  329. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm4x8: clamp(f / 127.0, -1, +1)</p>
  330. <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>
  331. <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>
  332. <dd>
  333. <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>
  334. </div>
  335. </div>
  336. <a id="ga1f66188e5d65afeb9ffba1ad971e4007"></a>
  337. <h2 class="memtitle"><span class="permalink"><a href="#ga1f66188e5d65afeb9ffba1ad971e4007">&#9670;&nbsp;</a></span>unpackUnorm2x16()</h2>
  338. <div class="memitem">
  339. <div class="memproto">
  340. <table class="memname">
  341. <tr>
  342. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00899.html#gabe65c061834f61b4f7cb6037b19006a4">vec2</a> glm::unpackUnorm2x16 </td>
  343. <td>(</td>
  344. <td class="paramtype">uint&#160;</td>
  345. <td class="paramname"><em>p</em></td><td>)</td>
  346. <td></td>
  347. </tr>
  348. </table>
  349. </div><div class="memdoc">
  350. <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>
  351. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  352. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm2x16: f / 65535.0</p>
  353. <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>
  354. <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>
  355. <dd>
  356. <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>
  357. </div>
  358. </div>
  359. <a id="ga7f903259150b67e9466f5f8edffcd197"></a>
  360. <h2 class="memtitle"><span class="permalink"><a href="#ga7f903259150b67e9466f5f8edffcd197">&#9670;&nbsp;</a></span>unpackUnorm4x8()</h2>
  361. <div class="memitem">
  362. <div class="memproto">
  363. <table class="memname">
  364. <tr>
  365. <td class="memname">GLM_FUNC_DECL <a class="el" href="a00899.html#gac215a35481a6597d1bf622a382e9d6e2">vec4</a> glm::unpackUnorm4x8 </td>
  366. <td>(</td>
  367. <td class="paramtype">uint&#160;</td>
  368. <td class="paramname"><em>p</em></td><td>)</td>
  369. <td></td>
  370. </tr>
  371. </table>
  372. </div><div class="memdoc">
  373. <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>
  374. <p>Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.</p>
  375. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0</p>
  376. <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>
  377. <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>
  378. <dd>
  379. <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>
  380. </div>
  381. </div>
  382. </div><!-- contents -->
  383. <!-- start footer part -->
  384. <hr class="footer"/><address class="footer"><small>
  385. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  386. <img class="footer" src="doxygen.png" alt="doxygen"/>
  387. </a> 1.8.18
  388. </small></address>
  389. </body>
  390. </html>