Added documentation for GTC+packing

This commit is contained in:
Christophe Riccio 2013-08-25 00:02:03 +02:00
parent 965b641722
commit 44f9db1c3b

View File

@ -74,7 +74,7 @@ namespace glm
/// @see vec4 unpackUnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL float unpackUnorm1x8(uint8 p);
GLM_FUNC_DECL float unpackUnorm1x8(uint8 pdf);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values.
/// Then, the results are packed into the returned 16-bit unsigned integer.
@ -120,6 +120,18 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL uint8 packSnorm1x8(float const & s);
/// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers.
/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm1x8: clamp(f / 127.0, -1, +1)
///
/// @see gtc_packing
/// @see vec2 unpackSnorm2x8(uint16 p)
/// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL float unpackSnorm1x8(uint8 p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values.
@ -137,6 +149,21 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v);
/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm2x8: clamp(f / 127.0, -1, +1)
///
/// 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.
///
/// @see gtc_packing
/// @see float unpackSnorm1x8(uint8 p)
/// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p);
/// First, converts the normalized floating-point value v into a 16-bit integer value.
@ -158,6 +185,9 @@ namespace glm
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnorm1x16: f / 65535.0
///
/// @see gtc_packing
/// @see vec2 unpackUnorm2x16(uint32 p)
/// @see vec4 unpackUnorm4x16(uint64 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <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>
GLM_FUNC_DECL float unpackUnorm1x16(uint16 p);
@ -187,6 +217,9 @@ namespace glm
/// 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.
///
/// @see gtc_packing
/// @see float unpackUnorm1x16(uint16 p)
/// @see vec2 unpackUnorm2x16(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <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>
GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 const & p);
@ -203,6 +236,18 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL uint16 packSnorm1x16(float v);
/// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned scalar.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm1x16: clamp(f / 32767.0, -1, +1)
///
/// @see gtc_packing
/// @see vec2 unpackSnorm2x16(uint32 p)
/// @see vec4 unpackSnorm4x16(uint64 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL float unpackSnorm1x16(uint16 p);
/// First, converts each component of the normalized floating-point value v into 16-bit integer values.
@ -220,6 +265,21 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v);
/// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm4x16: clamp(f / 32767.0, -1, +1)
///
/// 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.
///
/// @see gtc_packing
/// @see float unpackSnorm1x16(uint16 p)
/// @see vec2 unpackSnorm2x16(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <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>
GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 const & p);
/// Returns an unsigned integer obtained by converting the components of a floating-point scalar