rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / manglsl / unpackUnorm2x16.xml
diff --git a/upstream-doc/manglsl/unpackUnorm2x16.xml b/upstream-doc/manglsl/unpackUnorm2x16.xml
new file mode 100644 (file)
index 0000000..42b17fc
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
+              "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
+<refentry id="unpackUnorm">\r
+    <refmeta>\r
+        <refmetainfo>\r
+            <copyright>\r
+                <year>2011</year>\r
+                <holder>Khronos Group</holder>\r
+            </copyright>\r
+        </refmetainfo>\r
+        <refentrytitle>unpackUnorm</refentrytitle>\r
+        <manvolnum>3G</manvolnum>\r
+    </refmeta>\r
+    <refnamediv>\r
+        <refname>unpackUnorm2x16, unpackUnorm4x8, unpackSnorm4x8</refname>\r
+        <refpurpose>unpack floating-point values from an unsigned integer</refpurpose>\r
+    </refnamediv>\r
+    <refsynopsisdiv><title>Declaration</title>\r
+        <funcsynopsis>\r
+            <funcprototype>\r
+                <funcdef>vec2 <function>unpackUnorm2x16</function></funcdef>\r
+                <paramdef>uint <parameter>p</parameter></paramdef>\r
+            </funcprototype>\r
+            <funcprototype>\r
+                <funcdef>vec2 <function>unpackSnorm2x16</function></funcdef>\r
+                <paramdef>uint <parameter>p</parameter></paramdef>\r
+            </funcprototype>\r
+            <funcprototype>\r
+                <funcdef>vec4 <function>unpackUnorm4x8</function></funcdef>\r
+                <paramdef>uint <parameter>p</parameter></paramdef>\r
+            </funcprototype>\r
+            <funcprototype>\r
+                <funcdef>vec4 <function>unpackSnorm4x8</function></funcdef>\r
+                <paramdef>uint <parameter>p</parameter></paramdef>\r
+            </funcprototype>\r
+        </funcsynopsis>\r
+    </refsynopsisdiv>\r
+    <refsect1 id="parameters"><title>Parameters</title>\r
+        <variablelist>\r
+        <varlistentry>\r
+            <term><parameter>p</parameter></term>\r
+            <listitem>\r
+                <para>\r
+                    Specifies an unsigned integer containing packed floating-point values.\r
+                </para>\r
+            </listitem>\r
+        </varlistentry>\r
+        </variablelist>\r
+    </refsect1>\r
+    <refsect1 id="description"><title>Description</title>\r
+        <para>\r
+            <function>unpackUnorm2x16</function>, <function>unpackSnorm2x16</function>, <function>unpackUnorm4x8</function> and <function>unpackSnorm4x8</function> unpack\r
+            single 32-bit unsigned integers, specified in the parameter <parameter>p</parameter> into a pair of 16-bit unsigned integers,\r
+            four 8-bit unsigned integers or four 8-bit signed integers. Then, each component is converted to a normalized floating-point\r
+            value to generate the returned two- or four-component vector.\r
+        </para>\r
+        <para>\r
+            The conversion for unpacked fixed point value <emphasis>f</emphasis> to floating-point is performed as follows:\r
+            <itemizedlist>\r
+                <listitem><function>packUnorm2x16</function>: <code>f / 65535.0</code></listitem>\r
+                <listitem><function>packSnorm2x16</function>: <code><citerefentry><refentrytitle>clamp</refentrytitle></citerefentry>(f / 32727.0, -1.0, 1.0)</code></listitem>\r
+                <listitem><function>packUnorm4x8</function>: <code>f / 255.0</code></listitem>\r
+                <listitem><function>packSnorm4x8</function>: <code><citerefentry><refentrytitle>clamp</refentrytitle></citerefentry>(f / 127.0, -1.0, 1.0)</code></listitem>\r
+            </itemizedlist>\r
+        </para>\r
+        <para>\r
+            The first component of the returned vector will be extracted from the least significant bits of the input;\r
+            the last component will be extracted from the most significant bits.\r
+        </para>\r
+    </refsect1>\r
+    <refsect1 id="versions"><title>Version Support</title>\r
+        <informaltable frame="topbot">\r
+            #VARTABLECOLS#\r
+                <thead>\r
+                    #FUNCTABLEHEADER#\r
+                    <row>\r
+                        <entry>unpackUnorm2x16</entry>#newin41#\r
+                    </row>\r
+                    <row>\r
+                        <entry>unpackSnorm2x16</entry>#newin42#\r
+                    </row>\r
+                    <row>\r
+                        <entry>unpackUnorm4x8</entry>#newin41#\r
+                    </row>\r
+                    <row>\r
+                        <entry>unpackSnorm4x8</entry>#newin41#\r
+                    </row>\r
+                </thead>\r
+            </tgroup>\r
+        </informaltable>\r
+    </refsect1>\r
+    <refsect1 id="seealso"><title>See Also</title>\r
+        <para>\r
+            <citerefentry><refentrytitle>packUnorm2x16</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>packUnorm4x8</refentrytitle></citerefentry>,\r
+            <citerefentry><refentrytitle>packSnorm4x8</refentrytitle></citerefentry>\r
+        </para>\r
+    </refsect1>\r
+    <refsect1 id="Copyright"><title>Copyright</title>\r
+        <para>\r
+            Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. \r
+            This material may be distributed subject to the terms and conditions set forth in \r
+            the Open Publication License, v 1.0, 8 June 1999.\r
+            <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
+        </para>\r
+    </refsect1>\r
+</refentry>\r