a00173.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976
  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.8"/>
  7. <title>0.9.6: GLM_GTC_packing</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body>
  14. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  15. <div id="titlearea">
  16. <table cellspacing="0" cellpadding="0">
  17. <tbody>
  18. <tr style="height: 56px;">
  19. <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  20. <td style="padding-left: 0.5em;">
  21. <div id="projectname">0.9.6
  22. </div>
  23. </td>
  24. </tr>
  25. </tbody>
  26. </table>
  27. </div>
  28. <!-- end header part -->
  29. <!-- Generated by Doxygen 1.8.8 -->
  30. <div id="navrow1" class="tabs">
  31. <ul class="tablist">
  32. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  33. <li><a href="modules.html"><span>Modules</span></a></li>
  34. <li><a href="files.html"><span>Files</span></a></li>
  35. </ul>
  36. </div>
  37. </div><!-- top -->
  38. <div class="header">
  39. <div class="summary">
  40. <a href="#func-members">Functions</a> </div>
  41. <div class="headertitle">
  42. <div class="title">GLM_GTC_packing<div class="ingroups"><a class="el" href="a00158.html">GTC Extensions (Stable)</a></div></div> </div>
  43. </div><!--header-->
  44. <div class="contents">
  45. <table class="memberdecls">
  46. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  47. Functions</h2></td></tr>
  48. <tr class="memitem:ga4944ad465ff950e926d49621f916c78d"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga4944ad465ff950e926d49621f916c78d">packF2x11_1x10</a> (vec3 const &amp;v)</td></tr>
  49. <tr class="separator:ga4944ad465ff950e926d49621f916c78d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  50. <tr class="memitem:ga43f2093b6ff192a79058ff7834fc3528"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga43f2093b6ff192a79058ff7834fc3528">packHalf1x16</a> (float v)</td></tr>
  51. <tr class="separator:ga43f2093b6ff192a79058ff7834fc3528"><td class="memSeparator" colspan="2">&#160;</td></tr>
  52. <tr class="memitem:gafe2f7b39caf8f5ec555e1c059ec530e6"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#gafe2f7b39caf8f5ec555e1c059ec530e6">packHalf4x16</a> (vec4 const &amp;v)</td></tr>
  53. <tr class="separator:gafe2f7b39caf8f5ec555e1c059ec530e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  54. <tr class="memitem:ga06ecb6afb902dba45419008171db9023"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga06ecb6afb902dba45419008171db9023">packI3x10_1x2</a> (ivec4 const &amp;v)</td></tr>
  55. <tr class="separator:ga06ecb6afb902dba45419008171db9023"><td class="memSeparator" colspan="2">&#160;</td></tr>
  56. <tr class="memitem:gab22f8bcfdb5fc65af4701b25f143c1af"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#gab22f8bcfdb5fc65af4701b25f143c1af">packSnorm1x16</a> (float v)</td></tr>
  57. <tr class="separator:gab22f8bcfdb5fc65af4701b25f143c1af"><td class="memSeparator" colspan="2">&#160;</td></tr>
  58. <tr class="memitem:gae3592e0795e62aaa1865b3a10496a7a1"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#gae3592e0795e62aaa1865b3a10496a7a1">packSnorm1x8</a> (float s)</td></tr>
  59. <tr class="separator:gae3592e0795e62aaa1865b3a10496a7a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  60. <tr class="memitem:ga6be3cfb2cce3702f03e91bbeb5286d7e"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga6be3cfb2cce3702f03e91bbeb5286d7e">packSnorm2x8</a> (vec2 const &amp;v)</td></tr>
  61. <tr class="separator:ga6be3cfb2cce3702f03e91bbeb5286d7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  62. <tr class="memitem:gab997545661877d2c7362a5084d3897d3"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#gab997545661877d2c7362a5084d3897d3">packSnorm3x10_1x2</a> (vec4 const &amp;v)</td></tr>
  63. <tr class="separator:gab997545661877d2c7362a5084d3897d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  64. <tr class="memitem:ga358943934d21da947d5bcc88c2ab7832"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga358943934d21da947d5bcc88c2ab7832">packSnorm4x16</a> (vec4 const &amp;v)</td></tr>
  65. <tr class="separator:ga358943934d21da947d5bcc88c2ab7832"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:gada3d88d59f0f458f9c51a9fd359a4bc0"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#gada3d88d59f0f458f9c51a9fd359a4bc0">packU3x10_1x2</a> (uvec4 const &amp;v)</td></tr>
  67. <tr class="separator:gada3d88d59f0f458f9c51a9fd359a4bc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  68. <tr class="memitem:ga9f82737bf2a44bedff1d286b76837886"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga9f82737bf2a44bedff1d286b76837886">packUnorm1x16</a> (float v)</td></tr>
  69. <tr class="separator:ga9f82737bf2a44bedff1d286b76837886"><td class="memSeparator" colspan="2">&#160;</td></tr>
  70. <tr class="memitem:ga4b2fa60df3460403817d28b082ee0736"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga4b2fa60df3460403817d28b082ee0736">packUnorm1x8</a> (float v)</td></tr>
  71. <tr class="separator:ga4b2fa60df3460403817d28b082ee0736"><td class="memSeparator" colspan="2">&#160;</td></tr>
  72. <tr class="memitem:ga9a666b1c688ab54100061ed06526de6e"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga9a666b1c688ab54100061ed06526de6e">packUnorm2x8</a> (vec2 const &amp;v)</td></tr>
  73. <tr class="separator:ga9a666b1c688ab54100061ed06526de6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  74. <tr class="memitem:ga8a1ee625d2707c60530fb3fca2980b19"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga8a1ee625d2707c60530fb3fca2980b19">packUnorm3x10_1x2</a> (vec4 const &amp;v)</td></tr>
  75. <tr class="separator:ga8a1ee625d2707c60530fb3fca2980b19"><td class="memSeparator" colspan="2">&#160;</td></tr>
  76. <tr class="memitem:ga1f63c264e7ab63264e2b2a99fd393897"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga1f63c264e7ab63264e2b2a99fd393897">packUnorm4x16</a> (vec4 const &amp;v)</td></tr>
  77. <tr class="separator:ga1f63c264e7ab63264e2b2a99fd393897"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:ga2b1fd1e854705b1345e98409e0a25e50"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga2b1fd1e854705b1345e98409e0a25e50">unpackF2x11_1x10</a> (uint32 p)</td></tr>
  79. <tr class="separator:ga2b1fd1e854705b1345e98409e0a25e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. <tr class="memitem:gac37dedaba24b00adb4ec6e8f92c19dbf"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#gac37dedaba24b00adb4ec6e8f92c19dbf">unpackHalf1x16</a> (uint16 v)</td></tr>
  81. <tr class="separator:gac37dedaba24b00adb4ec6e8f92c19dbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:ga57dfc41b2eb20b0ac00efae7d9c49dcd"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga57dfc41b2eb20b0ac00efae7d9c49dcd">unpackHalf4x16</a> (uint64 p)</td></tr>
  83. <tr class="separator:ga57dfc41b2eb20b0ac00efae7d9c49dcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:ga9a05330e5490be0908d3b117d82aff56"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL ivec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga9a05330e5490be0908d3b117d82aff56">unpackI3x10_1x2</a> (uint32 p)</td></tr>
  85. <tr class="separator:ga9a05330e5490be0908d3b117d82aff56"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:ga96dd15002370627a443c835ab03a766c"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga96dd15002370627a443c835ab03a766c">unpackSnorm1x16</a> (uint16 p)</td></tr>
  87. <tr class="separator:ga96dd15002370627a443c835ab03a766c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:ga4851ff86678aa1c7ace9d67846894285"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga4851ff86678aa1c7ace9d67846894285">unpackSnorm1x8</a> (uint8 p)</td></tr>
  89. <tr class="separator:ga4851ff86678aa1c7ace9d67846894285"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:ga8b128e89be449fc71336968a66bf6e1a"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga8b128e89be449fc71336968a66bf6e1a">unpackSnorm2x8</a> (uint16 p)</td></tr>
  91. <tr class="separator:ga8b128e89be449fc71336968a66bf6e1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:ga7a4fbf79be9740e3c57737bc2af05e5b"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga7a4fbf79be9740e3c57737bc2af05e5b">unpackSnorm3x10_1x2</a> (uint32 p)</td></tr>
  93. <tr class="separator:ga7a4fbf79be9740e3c57737bc2af05e5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:gadb01fc0530f07beb509c89d97b6f4d20"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#gadb01fc0530f07beb509c89d97b6f4d20">unpackSnorm4x16</a> (uint64 const &amp;p)</td></tr>
  95. <tr class="separator:gadb01fc0530f07beb509c89d97b6f4d20"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:ga48df3042a7d079767f5891a1bfd8a60a"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL uvec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga48df3042a7d079767f5891a1bfd8a60a">unpackU3x10_1x2</a> (uint32 p)</td></tr>
  97. <tr class="separator:ga48df3042a7d079767f5891a1bfd8a60a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:ga83d34160a5cb7bcb5339823210fc7501"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga83d34160a5cb7bcb5339823210fc7501">unpackUnorm1x16</a> (uint16 p)</td></tr>
  99. <tr class="separator:ga83d34160a5cb7bcb5339823210fc7501"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. <tr class="memitem:ga1319207e30874fb4931a9ee913983ee1"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga1319207e30874fb4931a9ee913983ee1">unpackUnorm1x8</a> (uint8 p)</td></tr>
  101. <tr class="separator:ga1319207e30874fb4931a9ee913983ee1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:ga637cbe3913dd95c6e7b4c99c61bd611f"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga637cbe3913dd95c6e7b4c99c61bd611f">unpackUnorm2x8</a> (uint16 p)</td></tr>
  103. <tr class="separator:ga637cbe3913dd95c6e7b4c99c61bd611f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:ga5156d3060355fe332865da2c7f78815f"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga5156d3060355fe332865da2c7f78815f">unpackUnorm3x10_1x2</a> (uint32 p)</td></tr>
  105. <tr class="separator:ga5156d3060355fe332865da2c7f78815f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:ga2ae149c5d2473ac1e5f347bb654a242d"><td class="memItemLeft" align="right" valign="top">GLM_FUNC_DECL vec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00173.html#ga2ae149c5d2473ac1e5f347bb654a242d">unpackUnorm4x16</a> (uint64 p)</td></tr>
  107. <tr class="separator:ga2ae149c5d2473ac1e5f347bb654a242d"><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>This extension provides a set of function to convert vertors to packed formats. </p>
  111. <p>&lt;<a class="el" href="a00086.html" title="OpenGL Mathematics (glm.g-truc.net) ">glm/gtc/packing.hpp</a>&gt; need to be included to use these features. </p>
  112. <h2 class="groupheader">Function Documentation</h2>
  113. <a class="anchor" id="ga4944ad465ff950e926d49621f916c78d"></a>
  114. <div class="memitem">
  115. <div class="memproto">
  116. <table class="memname">
  117. <tr>
  118. <td class="memname">GLM_FUNC_DECL uint32 glm::packF2x11_1x10 </td>
  119. <td>(</td>
  120. <td class="paramtype">vec3 const &amp;&#160;</td>
  121. <td class="paramname"><em>v</em></td><td>)</td>
  122. <td></td>
  123. </tr>
  124. </table>
  125. </div><div class="memdoc">
  126. <p>First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values. </p>
  127. <p>Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value. Then, the results are packed into the returned 32-bit unsigned integer.</p>
  128. <p>The first vector component specifies the 11 least-significant bits of the result; the last component specifies the 10 most-significant bits.</p>
  129. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  130. <dd>
  131. vec3 unpackF2x11_1x10(uint32 const &amp; p) </dd></dl>
  132. </div>
  133. </div>
  134. <a class="anchor" id="ga43f2093b6ff192a79058ff7834fc3528"></a>
  135. <div class="memitem">
  136. <div class="memproto">
  137. <table class="memname">
  138. <tr>
  139. <td class="memname">GLM_FUNC_DECL uint16 glm::packHalf1x16 </td>
  140. <td>(</td>
  141. <td class="paramtype">float&#160;</td>
  142. <td class="paramname"><em>v</em></td><td>)</td>
  143. <td></td>
  144. </tr>
  145. </table>
  146. </div><div class="memdoc">
  147. <p>Returns an unsigned integer obtained by converting the components of a floating-point scalar to the 16-bit floating-point representation found in the OpenGL Specification, and then packing this 16-bit value into a 16-bit unsigned integer. </p>
  148. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  149. <dd>
  150. uint32 packHalf2x16(vec2 const &amp; v) </dd>
  151. <dd>
  152. uint64 packHalf4x16(vec4 const &amp; v) </dd>
  153. <dd>
  154. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> </dd>
  155. <dd>
  156. <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>
  157. </div>
  158. </div>
  159. <a class="anchor" id="gafe2f7b39caf8f5ec555e1c059ec530e6"></a>
  160. <div class="memitem">
  161. <div class="memproto">
  162. <table class="memname">
  163. <tr>
  164. <td class="memname">GLM_FUNC_DECL uint64 glm::packHalf4x16 </td>
  165. <td>(</td>
  166. <td class="paramtype">vec4 const &amp;&#160;</td>
  167. <td class="paramname"><em>v</em></td><td>)</td>
  168. <td></td>
  169. </tr>
  170. </table>
  171. </div><div class="memdoc">
  172. <p>Returns an unsigned integer obtained by converting the components of a four-component floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification, and then packing these four 16-bit values into a 64-bit unsigned integer. </p>
  173. <p>The first vector component specifies the 16 least-significant bits of the result; the forth component specifies the 16 most-significant bits.</p>
  174. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  175. <dd>
  176. uint16 packHalf1x16(float const &amp; v) </dd>
  177. <dd>
  178. uint32 packHalf2x16(vec2 const &amp; v) </dd>
  179. <dd>
  180. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> </dd>
  181. <dd>
  182. <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>
  183. </div>
  184. </div>
  185. <a class="anchor" id="ga06ecb6afb902dba45419008171db9023"></a>
  186. <div class="memitem">
  187. <div class="memproto">
  188. <table class="memname">
  189. <tr>
  190. <td class="memname">GLM_FUNC_DECL uint32 glm::packI3x10_1x2 </td>
  191. <td>(</td>
  192. <td class="paramtype">ivec4 const &amp;&#160;</td>
  193. <td class="paramname"><em>v</em></td><td>)</td>
  194. <td></td>
  195. </tr>
  196. </table>
  197. </div><div class="memdoc">
  198. <p>Returns an unsigned integer obtained by converting the components of a four-component signed integer vector to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, and then packing these four values into a 32-bit unsigned integer. </p>
  199. <p>The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.</p>
  200. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  201. <dd>
  202. uint32 packI3x10_1x2(uvec4 const &amp; v) </dd>
  203. <dd>
  204. uint32 packSnorm3x10_1x2(vec4 const &amp; v) </dd>
  205. <dd>
  206. uint32 packUnorm3x10_1x2(vec4 const &amp; v) </dd>
  207. <dd>
  208. ivec4 unpackI3x10_1x2(uint32 const &amp; p) </dd></dl>
  209. </div>
  210. </div>
  211. <a class="anchor" id="gab22f8bcfdb5fc65af4701b25f143c1af"></a>
  212. <div class="memitem">
  213. <div class="memproto">
  214. <table class="memname">
  215. <tr>
  216. <td class="memname">GLM_FUNC_DECL uint16 glm::packSnorm1x16 </td>
  217. <td>(</td>
  218. <td class="paramtype">float&#160;</td>
  219. <td class="paramname"><em>v</em></td><td>)</td>
  220. <td></td>
  221. </tr>
  222. </table>
  223. </div><div class="memdoc">
  224. <p>First, converts the normalized floating-point value v into 16-bit integer value. </p>
  225. <p>Then, the results are packed into the returned 16-bit unsigned integer.</p>
  226. <p>The conversion to fixed point is done as follows: packSnorm1x8: round(clamp(s, -1, +1) * 32767.0)</p>
  227. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  228. <dd>
  229. uint32 packSnorm2x16(vec2 const &amp; v) </dd>
  230. <dd>
  231. uint64 packSnorm4x16(vec4 const &amp; v) </dd>
  232. <dd>
  233. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> </dd>
  234. <dd>
  235. <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>
  236. </div>
  237. </div>
  238. <a class="anchor" id="gae3592e0795e62aaa1865b3a10496a7a1"></a>
  239. <div class="memitem">
  240. <div class="memproto">
  241. <table class="memname">
  242. <tr>
  243. <td class="memname">GLM_FUNC_DECL uint8 glm::packSnorm1x8 </td>
  244. <td>(</td>
  245. <td class="paramtype">float&#160;</td>
  246. <td class="paramname"><em>s</em></td><td>)</td>
  247. <td></td>
  248. </tr>
  249. </table>
  250. </div><div class="memdoc">
  251. <p>First, converts the normalized floating-point value v into 8-bit integer value. </p>
  252. <p>Then, the results are packed into the returned 8-bit unsigned integer.</p>
  253. <p>The conversion to fixed point is done as follows: packSnorm1x8: round(clamp(s, -1, +1) * 127.0)</p>
  254. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  255. <dd>
  256. uint16 packSnorm2x8(vec2 const &amp; v) </dd>
  257. <dd>
  258. uint32 packSnorm4x8(vec4 const &amp; v) </dd>
  259. <dd>
  260. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> </dd>
  261. <dd>
  262. <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>
  263. </div>
  264. </div>
  265. <a class="anchor" id="ga6be3cfb2cce3702f03e91bbeb5286d7e"></a>
  266. <div class="memitem">
  267. <div class="memproto">
  268. <table class="memname">
  269. <tr>
  270. <td class="memname">GLM_FUNC_DECL uint16 glm::packSnorm2x8 </td>
  271. <td>(</td>
  272. <td class="paramtype">vec2 const &amp;&#160;</td>
  273. <td class="paramname"><em>v</em></td><td>)</td>
  274. <td></td>
  275. </tr>
  276. </table>
  277. </div><div class="memdoc">
  278. <p>First, converts each component of the normalized floating-point value v into 8-bit integer values. </p>
  279. <p>Then, the results are packed into the returned 16-bit unsigned integer.</p>
  280. <p>The conversion for component c of v to fixed point is done as follows: packSnorm2x8: round(clamp(c, -1, +1) * 127.0)</p>
  281. <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>
  282. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  283. <dd>
  284. uint8 packSnorm1x8(float const &amp; v) </dd>
  285. <dd>
  286. uint32 packSnorm4x8(vec4 const &amp; v) </dd>
  287. <dd>
  288. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> </dd>
  289. <dd>
  290. <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>
  291. </div>
  292. </div>
  293. <a class="anchor" id="gab997545661877d2c7362a5084d3897d3"></a>
  294. <div class="memitem">
  295. <div class="memproto">
  296. <table class="memname">
  297. <tr>
  298. <td class="memname">GLM_FUNC_DECL uint32 glm::packSnorm3x10_1x2 </td>
  299. <td>(</td>
  300. <td class="paramtype">vec4 const &amp;&#160;</td>
  301. <td class="paramname"><em>v</em></td><td>)</td>
  302. <td></td>
  303. </tr>
  304. </table>
  305. </div><div class="memdoc">
  306. <p>First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values. </p>
  307. <p>Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values. Then, the results are packed into the returned 32-bit unsigned integer.</p>
  308. <p>The conversion for component c of v to fixed point is done as follows: packSnorm3x10_1x2(xyz): round(clamp(c, -1, +1) * 511.0) packSnorm3x10_1x2(w): round(clamp(c, -1, +1) * 1.0)</p>
  309. <p>The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.</p>
  310. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  311. <dd>
  312. vec4 unpackSnorm3x10_1x2(uint32 const &amp; p) </dd>
  313. <dd>
  314. uint32 packUnorm3x10_1x2(vec4 const &amp; v) </dd>
  315. <dd>
  316. uint32 packU3x10_1x2(uvec4 const &amp; v) </dd>
  317. <dd>
  318. uint32 packI3x10_1x2(ivec4 const &amp; v) </dd></dl>
  319. </div>
  320. </div>
  321. <a class="anchor" id="ga358943934d21da947d5bcc88c2ab7832"></a>
  322. <div class="memitem">
  323. <div class="memproto">
  324. <table class="memname">
  325. <tr>
  326. <td class="memname">GLM_FUNC_DECL uint64 glm::packSnorm4x16 </td>
  327. <td>(</td>
  328. <td class="paramtype">vec4 const &amp;&#160;</td>
  329. <td class="paramname"><em>v</em></td><td>)</td>
  330. <td></td>
  331. </tr>
  332. </table>
  333. </div><div class="memdoc">
  334. <p>First, converts each component of the normalized floating-point value v into 16-bit integer values. </p>
  335. <p>Then, the results are packed into the returned 64-bit unsigned integer.</p>
  336. <p>The conversion for component c of v to fixed point is done as follows: packSnorm2x8: round(clamp(c, -1, +1) * 32767.0)</p>
  337. <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>
  338. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  339. <dd>
  340. uint16 packSnorm1x16(float const &amp; v) </dd>
  341. <dd>
  342. uint32 packSnorm2x16(vec2 const &amp; v) </dd>
  343. <dd>
  344. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> </dd>
  345. <dd>
  346. <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>
  347. </div>
  348. </div>
  349. <a class="anchor" id="gada3d88d59f0f458f9c51a9fd359a4bc0"></a>
  350. <div class="memitem">
  351. <div class="memproto">
  352. <table class="memname">
  353. <tr>
  354. <td class="memname">GLM_FUNC_DECL uint32 glm::packU3x10_1x2 </td>
  355. <td>(</td>
  356. <td class="paramtype">uvec4 const &amp;&#160;</td>
  357. <td class="paramname"><em>v</em></td><td>)</td>
  358. <td></td>
  359. </tr>
  360. </table>
  361. </div><div class="memdoc">
  362. <p>Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, and then packing these four values into a 32-bit unsigned integer. </p>
  363. <p>The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.</p>
  364. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  365. <dd>
  366. uint32 packI3x10_1x2(ivec4 const &amp; v) </dd>
  367. <dd>
  368. uint32 packSnorm3x10_1x2(vec4 const &amp; v) </dd>
  369. <dd>
  370. uint32 packUnorm3x10_1x2(vec4 const &amp; v) </dd>
  371. <dd>
  372. ivec4 unpackU3x10_1x2(uint32 const &amp; p) </dd></dl>
  373. </div>
  374. </div>
  375. <a class="anchor" id="ga9f82737bf2a44bedff1d286b76837886"></a>
  376. <div class="memitem">
  377. <div class="memproto">
  378. <table class="memname">
  379. <tr>
  380. <td class="memname">GLM_FUNC_DECL uint16 glm::packUnorm1x16 </td>
  381. <td>(</td>
  382. <td class="paramtype">float&#160;</td>
  383. <td class="paramname"><em>v</em></td><td>)</td>
  384. <td></td>
  385. </tr>
  386. </table>
  387. </div><div class="memdoc">
  388. <p>First, converts the normalized floating-point value v into a 16-bit integer value. </p>
  389. <p>Then, the results are packed into the returned 16-bit unsigned integer.</p>
  390. <p>The conversion for component c of v to fixed point is done as follows: packUnorm1x16: round(clamp(c, 0, +1) * 65535.0)</p>
  391. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  392. <dd>
  393. uint16 packSnorm1x16(float const &amp; v) </dd>
  394. <dd>
  395. uint64 packSnorm4x16(vec4 const &amp; v) </dd>
  396. <dd>
  397. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> </dd>
  398. <dd>
  399. <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>
  400. </div>
  401. </div>
  402. <a class="anchor" id="ga4b2fa60df3460403817d28b082ee0736"></a>
  403. <div class="memitem">
  404. <div class="memproto">
  405. <table class="memname">
  406. <tr>
  407. <td class="memname">GLM_FUNC_DECL uint8 glm::packUnorm1x8 </td>
  408. <td>(</td>
  409. <td class="paramtype">float&#160;</td>
  410. <td class="paramname"><em>v</em></td><td>)</td>
  411. <td></td>
  412. </tr>
  413. </table>
  414. </div><div class="memdoc">
  415. <p>First, converts the normalized floating-point value v into a 8-bit integer value. </p>
  416. <p>Then, the results are packed into the returned 8-bit unsigned integer.</p>
  417. <p>The conversion for component c of v to fixed point is done as follows: packUnorm1x8: round(clamp(c, 0, +1) * 255.0)</p>
  418. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  419. <dd>
  420. uint16 packUnorm2x8(vec2 const &amp; v) </dd>
  421. <dd>
  422. uint32 packUnorm4x8(vec4 const &amp; v) </dd>
  423. <dd>
  424. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> </dd>
  425. <dd>
  426. <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>
  427. </div>
  428. </div>
  429. <a class="anchor" id="ga9a666b1c688ab54100061ed06526de6e"></a>
  430. <div class="memitem">
  431. <div class="memproto">
  432. <table class="memname">
  433. <tr>
  434. <td class="memname">GLM_FUNC_DECL uint16 glm::packUnorm2x8 </td>
  435. <td>(</td>
  436. <td class="paramtype">vec2 const &amp;&#160;</td>
  437. <td class="paramname"><em>v</em></td><td>)</td>
  438. <td></td>
  439. </tr>
  440. </table>
  441. </div><div class="memdoc">
  442. <p>First, converts each component of the normalized floating-point value v into 8-bit integer values. </p>
  443. <p>Then, the results are packed into the returned 16-bit unsigned integer.</p>
  444. <p>The conversion for component c of v to fixed point is done as follows: packUnorm2x8: round(clamp(c, 0, +1) * 255.0)</p>
  445. <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>
  446. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  447. <dd>
  448. uint8 packUnorm1x8(float const &amp; v) </dd>
  449. <dd>
  450. uint32 packUnorm4x8(vec4 const &amp; v) </dd>
  451. <dd>
  452. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> </dd>
  453. <dd>
  454. <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>
  455. </div>
  456. </div>
  457. <a class="anchor" id="ga8a1ee625d2707c60530fb3fca2980b19"></a>
  458. <div class="memitem">
  459. <div class="memproto">
  460. <table class="memname">
  461. <tr>
  462. <td class="memname">GLM_FUNC_DECL uint32 glm::packUnorm3x10_1x2 </td>
  463. <td>(</td>
  464. <td class="paramtype">vec4 const &amp;&#160;</td>
  465. <td class="paramname"><em>v</em></td><td>)</td>
  466. <td></td>
  467. </tr>
  468. </table>
  469. </div><div class="memdoc">
  470. <p>First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values. </p>
  471. <p>Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values. Then, the results are packed into the returned 32-bit unsigned integer.</p>
  472. <p>The conversion for component c of v to fixed point is done as follows: packUnorm3x10_1x2(xyz): round(clamp(c, 0, +1) * 1023.0) packUnorm3x10_1x2(w): round(clamp(c, 0, +1) * 3.0)</p>
  473. <p>The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.</p>
  474. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  475. <dd>
  476. vec4 unpackUnorm3x10_1x2(uint32 const &amp; p) </dd>
  477. <dd>
  478. uint32 packUnorm3x10_1x2(vec4 const &amp; v) </dd>
  479. <dd>
  480. uint32 packU3x10_1x2(uvec4 const &amp; v) </dd>
  481. <dd>
  482. uint32 packI3x10_1x2(ivec4 const &amp; v) </dd></dl>
  483. </div>
  484. </div>
  485. <a class="anchor" id="ga1f63c264e7ab63264e2b2a99fd393897"></a>
  486. <div class="memitem">
  487. <div class="memproto">
  488. <table class="memname">
  489. <tr>
  490. <td class="memname">GLM_FUNC_DECL uint64 glm::packUnorm4x16 </td>
  491. <td>(</td>
  492. <td class="paramtype">vec4 const &amp;&#160;</td>
  493. <td class="paramname"><em>v</em></td><td>)</td>
  494. <td></td>
  495. </tr>
  496. </table>
  497. </div><div class="memdoc">
  498. <p>First, converts each component of the normalized floating-point value v into 16-bit integer values. </p>
  499. <p>Then, the results are packed into the returned 64-bit unsigned integer.</p>
  500. <p>The conversion for component c of v to fixed point is done as follows: packUnorm4x16: round(clamp(c, 0, +1) * 65535.0)</p>
  501. <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>
  502. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  503. <dd>
  504. uint16 packUnorm1x16(float const &amp; v) </dd>
  505. <dd>
  506. uint32 packUnorm2x16(vec2 const &amp; v) </dd>
  507. <dd>
  508. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> </dd>
  509. <dd>
  510. <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>
  511. </div>
  512. </div>
  513. <a class="anchor" id="ga2b1fd1e854705b1345e98409e0a25e50"></a>
  514. <div class="memitem">
  515. <div class="memproto">
  516. <table class="memname">
  517. <tr>
  518. <td class="memname">GLM_FUNC_DECL vec3 glm::unpackF2x11_1x10 </td>
  519. <td>(</td>
  520. <td class="paramtype">uint32&#160;</td>
  521. <td class="paramname"><em>p</em></td><td>)</td>
  522. <td></td>
  523. </tr>
  524. </table>
  525. </div><div class="memdoc">
  526. <p>First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . </p>
  527. <p>Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.</p>
  528. <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>
  529. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  530. <dd>
  531. uint32 packF2x11_1x10(vec3 const &amp; v) </dd></dl>
  532. </div>
  533. </div>
  534. <a class="anchor" id="gac37dedaba24b00adb4ec6e8f92c19dbf"></a>
  535. <div class="memitem">
  536. <div class="memproto">
  537. <table class="memname">
  538. <tr>
  539. <td class="memname">GLM_FUNC_DECL float glm::unpackHalf1x16 </td>
  540. <td>(</td>
  541. <td class="paramtype">uint16&#160;</td>
  542. <td class="paramname"><em>v</em></td><td>)</td>
  543. <td></td>
  544. </tr>
  545. </table>
  546. </div><div class="memdoc">
  547. <p>Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value, interpreted as a 16-bit floating-point number according to the OpenGL Specification, and converting it to 32-bit floating-point values. </p>
  548. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  549. <dd>
  550. vec2 unpackHalf2x16(uint32 const &amp; v) </dd>
  551. <dd>
  552. vec4 unpackHalf4x16(uint64 const &amp; v) </dd>
  553. <dd>
  554. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a> </dd>
  555. <dd>
  556. <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>
  557. </div>
  558. </div>
  559. <a class="anchor" id="ga57dfc41b2eb20b0ac00efae7d9c49dcd"></a>
  560. <div class="memitem">
  561. <div class="memproto">
  562. <table class="memname">
  563. <tr>
  564. <td class="memname">GLM_FUNC_DECL vec4 glm::unpackHalf4x16 </td>
  565. <td>(</td>
  566. <td class="paramtype">uint64&#160;</td>
  567. <td class="paramname"><em>p</em></td><td>)</td>
  568. <td></td>
  569. </tr>
  570. </table>
  571. </div><div class="memdoc">
  572. <p>Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 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>
  573. <p>The first component of the vector is obtained from the 16 least-significant bits of v; the forth component is obtained from the 16 most-significant bits of v.</p>
  574. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  575. <dd>
  576. float unpackHalf1x16(uint16 const &amp; v) </dd>
  577. <dd>
  578. vec2 unpackHalf2x16(uint32 const &amp; v) </dd>
  579. <dd>
  580. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a> </dd>
  581. <dd>
  582. <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>
  583. </div>
  584. </div>
  585. <a class="anchor" id="ga9a05330e5490be0908d3b117d82aff56"></a>
  586. <div class="memitem">
  587. <div class="memproto">
  588. <table class="memname">
  589. <tr>
  590. <td class="memname">GLM_FUNC_DECL ivec4 glm::unpackI3x10_1x2 </td>
  591. <td>(</td>
  592. <td class="paramtype">uint32&#160;</td>
  593. <td class="paramname"><em>p</em></td><td>)</td>
  594. <td></td>
  595. </tr>
  596. </table>
  597. </div><div class="memdoc">
  598. <p>Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. </p>
  599. <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>
  600. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  601. <dd>
  602. uint32 packU3x10_1x2(uvec4 const &amp; v) </dd>
  603. <dd>
  604. vec4 unpackSnorm3x10_1x2(uint32 const &amp; p); </dd>
  605. <dd>
  606. uvec4 unpackI3x10_1x2(uint32 const &amp; p); </dd></dl>
  607. </div>
  608. </div>
  609. <a class="anchor" id="ga96dd15002370627a443c835ab03a766c"></a>
  610. <div class="memitem">
  611. <div class="memproto">
  612. <table class="memname">
  613. <tr>
  614. <td class="memname">GLM_FUNC_DECL float glm::unpackSnorm1x16 </td>
  615. <td>(</td>
  616. <td class="paramtype">uint16&#160;</td>
  617. <td class="paramname"><em>p</em></td><td>)</td>
  618. <td></td>
  619. </tr>
  620. </table>
  621. </div><div class="memdoc">
  622. <p>First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. </p>
  623. <p>Then, each component is converted to a normalized floating-point value to generate the returned scalar.</p>
  624. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm1x16: clamp(f / 32767.0, -1, +1)</p>
  625. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  626. <dd>
  627. vec2 unpackSnorm2x16(uint32 p) </dd>
  628. <dd>
  629. vec4 unpackSnorm4x16(uint64 p) </dd>
  630. <dd>
  631. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml">GLSL unpackSnorm4x8 man page</a> </dd>
  632. <dd>
  633. <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>
  634. </div>
  635. </div>
  636. <a class="anchor" id="ga4851ff86678aa1c7ace9d67846894285"></a>
  637. <div class="memitem">
  638. <div class="memproto">
  639. <table class="memname">
  640. <tr>
  641. <td class="memname">GLM_FUNC_DECL float glm::unpackSnorm1x8 </td>
  642. <td>(</td>
  643. <td class="paramtype">uint8&#160;</td>
  644. <td class="paramname"><em>p</em></td><td>)</td>
  645. <td></td>
  646. </tr>
  647. </table>
  648. </div><div class="memdoc">
  649. <p>First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. </p>
  650. <p>Then, the value is converted to a normalized floating-point value to generate the returned scalar.</p>
  651. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm1x8: clamp(f / 127.0, -1, +1)</p>
  652. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  653. <dd>
  654. vec2 unpackSnorm2x8(uint16 p) </dd>
  655. <dd>
  656. vec4 unpackSnorm4x8(uint32 p) </dd>
  657. <dd>
  658. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> </dd>
  659. <dd>
  660. <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>
  661. </div>
  662. </div>
  663. <a class="anchor" id="ga8b128e89be449fc71336968a66bf6e1a"></a>
  664. <div class="memitem">
  665. <div class="memproto">
  666. <table class="memname">
  667. <tr>
  668. <td class="memname">GLM_FUNC_DECL vec2 glm::unpackSnorm2x8 </td>
  669. <td>(</td>
  670. <td class="paramtype">uint16&#160;</td>
  671. <td class="paramname"><em>p</em></td><td>)</td>
  672. <td></td>
  673. </tr>
  674. </table>
  675. </div><div class="memdoc">
  676. <p>First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. </p>
  677. <p>Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.</p>
  678. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm2x8: clamp(f / 127.0, -1, +1)</p>
  679. <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>
  680. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  681. <dd>
  682. float unpackSnorm1x8(uint8 p) </dd>
  683. <dd>
  684. vec4 unpackSnorm4x8(uint32 p) </dd>
  685. <dd>
  686. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> </dd>
  687. <dd>
  688. <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>
  689. </div>
  690. </div>
  691. <a class="anchor" id="ga7a4fbf79be9740e3c57737bc2af05e5b"></a>
  692. <div class="memitem">
  693. <div class="memproto">
  694. <table class="memname">
  695. <tr>
  696. <td class="memname">GLM_FUNC_DECL vec4 glm::unpackSnorm3x10_1x2 </td>
  697. <td>(</td>
  698. <td class="paramtype">uint32&#160;</td>
  699. <td class="paramname"><em>p</em></td><td>)</td>
  700. <td></td>
  701. </tr>
  702. </table>
  703. </div><div class="memdoc">
  704. <p>First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. </p>
  705. <p>Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.</p>
  706. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1) unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1)</p>
  707. <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>
  708. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  709. <dd>
  710. uint32 packSnorm3x10_1x2(vec4 const &amp; v) </dd>
  711. <dd>
  712. vec4 unpackUnorm3x10_1x2(uint32 const &amp; p)) </dd>
  713. <dd>
  714. uvec4 unpackI3x10_1x2(uint32 const &amp; p) </dd>
  715. <dd>
  716. uvec4 unpackU3x10_1x2(uint32 const &amp; p) </dd></dl>
  717. </div>
  718. </div>
  719. <a class="anchor" id="gadb01fc0530f07beb509c89d97b6f4d20"></a>
  720. <div class="memitem">
  721. <div class="memproto">
  722. <table class="memname">
  723. <tr>
  724. <td class="memname">GLM_FUNC_DECL vec4 glm::unpackSnorm4x16 </td>
  725. <td>(</td>
  726. <td class="paramtype">uint64 const &amp;&#160;</td>
  727. <td class="paramname"><em>p</em></td><td>)</td>
  728. <td></td>
  729. </tr>
  730. </table>
  731. </div><div class="memdoc">
  732. <p>First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. </p>
  733. <p>Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.</p>
  734. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm4x16: clamp(f / 32767.0, -1, +1)</p>
  735. <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>
  736. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  737. <dd>
  738. float unpackSnorm1x16(uint16 p) </dd>
  739. <dd>
  740. vec2 unpackSnorm2x16(uint32 p) </dd>
  741. <dd>
  742. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a> </dd>
  743. <dd>
  744. <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>
  745. </div>
  746. </div>
  747. <a class="anchor" id="ga48df3042a7d079767f5891a1bfd8a60a"></a>
  748. <div class="memitem">
  749. <div class="memproto">
  750. <table class="memname">
  751. <tr>
  752. <td class="memname">GLM_FUNC_DECL uvec4 glm::unpackU3x10_1x2 </td>
  753. <td>(</td>
  754. <td class="paramtype">uint32&#160;</td>
  755. <td class="paramname"><em>p</em></td><td>)</td>
  756. <td></td>
  757. </tr>
  758. </table>
  759. </div><div class="memdoc">
  760. <p>Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. </p>
  761. <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>
  762. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  763. <dd>
  764. uint32 packU3x10_1x2(uvec4 const &amp; v) </dd>
  765. <dd>
  766. vec4 unpackSnorm3x10_1x2(uint32 const &amp; p); </dd>
  767. <dd>
  768. uvec4 unpackI3x10_1x2(uint32 const &amp; p); </dd></dl>
  769. </div>
  770. </div>
  771. <a class="anchor" id="ga83d34160a5cb7bcb5339823210fc7501"></a>
  772. <div class="memitem">
  773. <div class="memproto">
  774. <table class="memname">
  775. <tr>
  776. <td class="memname">GLM_FUNC_DECL float glm::unpackUnorm1x16 </td>
  777. <td>(</td>
  778. <td class="paramtype">uint16&#160;</td>
  779. <td class="paramname"><em>p</em></td><td>)</td>
  780. <td></td>
  781. </tr>
  782. </table>
  783. </div><div class="memdoc">
  784. <p>First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. </p>
  785. <p>Then, the value is converted to a normalized floating-point value to generate the returned scalar.</p>
  786. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm1x16: f / 65535.0</p>
  787. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  788. <dd>
  789. vec2 unpackUnorm2x16(uint32 p) </dd>
  790. <dd>
  791. vec4 unpackUnorm4x16(uint64 p) </dd>
  792. <dd>
  793. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a> </dd>
  794. <dd>
  795. <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>
  796. </div>
  797. </div>
  798. <a class="anchor" id="ga1319207e30874fb4931a9ee913983ee1"></a>
  799. <div class="memitem">
  800. <div class="memproto">
  801. <table class="memname">
  802. <tr>
  803. <td class="memname">GLM_FUNC_DECL float glm::unpackUnorm1x8 </td>
  804. <td>(</td>
  805. <td class="paramtype">uint8&#160;</td>
  806. <td class="paramname"><em>p</em></td><td>)</td>
  807. <td></td>
  808. </tr>
  809. </table>
  810. </div><div class="memdoc">
  811. <p>Convert a single 8-bit integer to a normalized floating-point value. </p>
  812. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0</p>
  813. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  814. <dd>
  815. vec2 unpackUnorm2x8(uint16 p) </dd>
  816. <dd>
  817. vec4 unpackUnorm4x8(uint32 p) </dd>
  818. <dd>
  819. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> </dd>
  820. <dd>
  821. <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>
  822. </div>
  823. </div>
  824. <a class="anchor" id="ga637cbe3913dd95c6e7b4c99c61bd611f"></a>
  825. <div class="memitem">
  826. <div class="memproto">
  827. <table class="memname">
  828. <tr>
  829. <td class="memname">GLM_FUNC_DECL vec2 glm::unpackUnorm2x8 </td>
  830. <td>(</td>
  831. <td class="paramtype">uint16&#160;</td>
  832. <td class="paramname"><em>p</em></td><td>)</td>
  833. <td></td>
  834. </tr>
  835. </table>
  836. </div><div class="memdoc">
  837. <p>First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. </p>
  838. <p>Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.</p>
  839. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0</p>
  840. <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>
  841. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  842. <dd>
  843. float unpackUnorm1x8(uint8 v) </dd>
  844. <dd>
  845. vec4 unpackUnorm4x8(uint32 p) </dd>
  846. <dd>
  847. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> </dd>
  848. <dd>
  849. <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>
  850. </div>
  851. </div>
  852. <a class="anchor" id="ga5156d3060355fe332865da2c7f78815f"></a>
  853. <div class="memitem">
  854. <div class="memproto">
  855. <table class="memname">
  856. <tr>
  857. <td class="memname">GLM_FUNC_DECL vec4 glm::unpackUnorm3x10_1x2 </td>
  858. <td>(</td>
  859. <td class="paramtype">uint32&#160;</td>
  860. <td class="paramname"><em>p</em></td><td>)</td>
  861. <td></td>
  862. </tr>
  863. </table>
  864. </div><div class="memdoc">
  865. <p>First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. </p>
  866. <p>Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.</p>
  867. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1) unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1)</p>
  868. <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>
  869. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  870. <dd>
  871. uint32 packSnorm3x10_1x2(vec4 const &amp; v) </dd>
  872. <dd>
  873. vec4 unpackInorm3x10_1x2(uint32 const &amp; p)) </dd>
  874. <dd>
  875. uvec4 unpackI3x10_1x2(uint32 const &amp; p) </dd>
  876. <dd>
  877. uvec4 unpackU3x10_1x2(uint32 const &amp; p) </dd></dl>
  878. </div>
  879. </div>
  880. <a class="anchor" id="ga2ae149c5d2473ac1e5f347bb654a242d"></a>
  881. <div class="memitem">
  882. <div class="memproto">
  883. <table class="memname">
  884. <tr>
  885. <td class="memname">GLM_FUNC_DECL vec4 glm::unpackUnorm4x16 </td>
  886. <td>(</td>
  887. <td class="paramtype">uint64&#160;</td>
  888. <td class="paramname"><em>p</em></td><td>)</td>
  889. <td></td>
  890. </tr>
  891. </table>
  892. </div><div class="memdoc">
  893. <p>First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. </p>
  894. <p>Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.</p>
  895. <p>The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnormx4x16: f / 65535.0</p>
  896. <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>
  897. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00173.html" title="This extension provides a set of function to convert vertors to packed formats. ">GLM_GTC_packing</a> </dd>
  898. <dd>
  899. float unpackUnorm1x16(uint16 p) </dd>
  900. <dd>
  901. vec2 unpackUnorm2x16(uint32 p) </dd>
  902. <dd>
  903. <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a> </dd>
  904. <dd>
  905. <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>
  906. </div>
  907. </div>
  908. </div><!-- contents -->
  909. <!-- start footer part -->
  910. <hr class="footer"/><address class="footer"><small>
  911. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  912. <img class="footer" src="doxygen.png" alt="doxygen"/>
  913. </a> 1.8.8
  914. </small></address>
  915. </body>
  916. </html>