2
0
Эх сурвалжийг харах

Merge branch '0.9.2' into 0.9.3

Christophe Riccio 14 жил өмнө
parent
commit
1fdf9c8d5f

+ 52 - 10
doc/src/data.xml

@@ -3,16 +3,17 @@
 <glm copyright="Copyright © 2005 - 2011">
   <downloads>
     <section name="GLM - zip files">
-	  <download name="GLM 0.9.2.1" date="24/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download"/>
-      <download name="GLM 0.9.2.0" date="08/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.zip/download"/>
-      <download name="GLM 0.9.1.3" date="07/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download"/>
-      <download name="GLM 0.9.1.2" date="12/04/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
-      <download name="GLM 0.9.1.1" date="17/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
-      <download name="GLM 0.9.1.0" date="03/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download"/>
-      <download name="GLM 0.9.1.B" date="13/02/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download"/>
-      <download name="GLM 0.9.0.8" date="13/02/2010" size="3.3 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download"/>
-      <download name="GLM 0.9.1.A" date="31/01/2010" size="3.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download"/>
-      <download name="GLM 0.9.0.7" date="30/01/2010" size="1.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download"/>
+		<download name="GLM 0.9.2.2" date="06/06/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.zip/download"/>
+	  <download name="GLM 0.9.2.1" date="24/05/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download"/>
+      <download name="GLM 0.9.2.0" date="08/05/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.zip/download"/>
+      <download name="GLM 0.9.1.3" date="07/05/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download"/>
+      <download name="GLM 0.9.1.2" date="12/04/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
+      <download name="GLM 0.9.1.1" date="17/03/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
+      <download name="GLM 0.9.1.0" date="03/03/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download"/>
+      <download name="GLM 0.9.1.B" date="13/02/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download"/>
+      <download name="GLM 0.9.0.8" date="13/02/2011" size="3.3 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download"/>
+      <download name="GLM 0.9.1.A" date="31/01/2011" size="3.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download"/>
+      <download name="GLM 0.9.0.7" date="30/01/2011" size="1.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download"/>
       <download name="GLM 0.9.0.6" date="21/12/2010" size="2.2 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.6/glm-0.9.0.6.zip/download"/>
       <download name="GLM 0.9.0.5" date="01/11/2010" size="2.2 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.5/glm-0.9.0.5.zip/download"/>
       <download name="GLM 0.9.0.4" date="04/10/2010" size="1.5 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.4/glm-0.9.0.4.zip/download"/>
@@ -64,6 +65,7 @@
       <download name="GLM 0.1.0.0" date="02/21/2005" size="29.2 KB" link="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download"/>
     </section>
     <section name="GLM - 7z files">
+		<download name="GLM 0.9.2.2" date="06/06/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.7z/download"/>
 		<download name="GLM 0.9.2.1" date="24/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.7z/download"/>
 		<download name="GLM 0.9.2.0" date="08/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.7z/download"/>
       <download name="GLM 0.9.1.3" date="07/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download"/>
@@ -152,6 +154,46 @@
   </todo>
 
   <page_news>
+	  <news index="0067" date="06/06/2011" title="GLM 0.9.2.2 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
+		  <paragraph>
+			The main improvement of this version comes from the extented number of matrix contructors so that a programmer can used diffent scalar types for each parameter.
+		  </paragraph>
+		  <code>
+			  <line>
+				  <keyword>#include </keyword>
+				  <string>&lt;glm/glm.hpp&gt;</string>
+			  </line>
+			  <line>
+
+			  </line>
+			  <line>
+				  <comment>// Create an identity matrix</comment>
+			  </line>
+			  <line>
+				  glm::mat3 m(
+			  </line>
+			  <line align="32px">
+				  1, 0.0, 0,
+			  </line>
+			  <line align="32px">
+				  0.0, 1.0, 0.0f, 
+			  </line>
+			  <line align="32px">
+				  0, 0.0, 1.0f);
+			  </line>
+			</code>
+		  <paragraph>
+			  The quaternion implementation has been updated as well, fixing the various slerp implementation flavour (mix, shortMix and fastMix) and providing more completeness: Added interaction with GLM_GTX_epsilon and missing lowp_quat, mediump_quat and highp_quat but also none square matrix equivalents.
+		  </paragraph>
+		  <paragraph>
+			Finally, some efforts have been put to remove warnings across all supported compilers.
+		  </paragraph>
+
+		  <source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.zip/download">GLM 0.9.2.2 (zip)</source>
+		  <source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.7z/download">GLM 0.9.2.2 (7z)</source>
+		  <source type="Link" href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</source>
+	  </news>
+
 	  <news index="0066" date="24/05/2011" title="GLM 0.9.2.1 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
 		  <paragraph>
 			  GLM 0.9.2.1 significantly improves compiler detection which allows CUDA to be automatically recognized when GLM is used inside a CUDA kernel. 

+ 110 - 105
glm/core/intrinsic_common.inl

@@ -21,107 +21,107 @@ namespace detail{
 	   ieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}
 	};
 
-	static const __m128 zero = _mm_setzero_ps();
-	static const __m128 one = _mm_set_ps1(1.0f);
-	static const __m128 minus_one = _mm_set_ps1(-1.0f);
-	static const __m128 two = _mm_set_ps1(2.0f);
-	static const __m128 three = _mm_set_ps1(3.0f);
-	static const __m128 pi = _mm_set_ps1(3.1415926535897932384626433832795f);
-	static const __m128 hundred_eighty = _mm_set_ps1(180.f);
-	static const __m128 pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f);
-	static const __m128 hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f);
+	static const __m128 GLM_VAR_USED zero = _mm_setzero_ps();
+	static const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f);
+	static const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f);
+	static const __m128 GLM_VAR_USED two = _mm_set_ps1(2.0f);
+	static const __m128 GLM_VAR_USED three = _mm_set_ps1(3.0f);
+	static const __m128 GLM_VAR_USED pi = _mm_set_ps1(3.1415926535897932384626433832795f);
+	static const __m128 GLM_VAR_USED hundred_eighty = _mm_set_ps1(180.f);
+	static const __m128 GLM_VAR_USED pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f);
+	static const __m128 GLM_VAR_USED hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f);
 
 	static const ieee754_QNAN absMask;
-	static const __m128 abs4Mask = _mm_set_ps1(absMask.f);
-
-	static const __m128 _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000));
-        //static const __m128 _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF));
-        //static const __m128 _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
-        //static const __m128 _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));
-        //static const __m128 _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000));
-	static const __m128 _epi32_0 = _mm_set_ps1(0);
-	static const __m128 _epi32_1 = _mm_set_ps1(1);
-	static const __m128 _epi32_2 = _mm_set_ps1(2);
-	static const __m128 _epi32_3 = _mm_set_ps1(3);
-	static const __m128 _epi32_4 = _mm_set_ps1(4);
-	static const __m128 _epi32_5 = _mm_set_ps1(5);
-	static const __m128 _epi32_6 = _mm_set_ps1(6);
-	static const __m128 _epi32_7 = _mm_set_ps1(7);
-	static const __m128 _epi32_8 = _mm_set_ps1(8);
-	static const __m128 _epi32_9 = _mm_set_ps1(9);
-	static const __m128 _epi32_127 = _mm_set_ps1(127);
-        //static const __m128 _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000));
-        //static const __m128 _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
-
-	static const __m128 _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f);
-	static const __m128 _ps_0p5 = _mm_set_ps1(0.5f);
-	static const __m128 _ps_1 = _mm_set_ps1(1.0f);
-	static const __m128 _ps_m1 = _mm_set_ps1(-1.0f);
-	static const __m128 _ps_2 = _mm_set_ps1(2.0f);
-	static const __m128 _ps_3 = _mm_set_ps1(3.0f);
-	static const __m128 _ps_127 = _mm_set_ps1(127.0f);
-	static const __m128 _ps_255 = _mm_set_ps1(255.0f);
-	static const __m128 _ps_2pow23 = _mm_set_ps1(8388608.0f);
-
-	static const __m128 _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);
-	static const __m128 _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f);
-	static const __m128 _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f);
-	static const __m128 _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f);
-
-	static const __m128 _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f);
-	static const __m128 _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f);
-	static const __m128 _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f);
-	static const __m128 _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f);
-	static const __m128 _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f);
-	static const __m128 _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f);
-
-	static const __m128 _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f);
-	static const __m128 _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f);
-	static const __m128 _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f);
-	static const __m128 _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f);
-	static const __m128 _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f);
-	static const __m128 _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f);
-	static const __m128 _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f);
-	static const __m128 _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f);
-	static const __m128 _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f);
-	static const __m128 _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f);
-	static const __m128 _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f);
-	static const __m128 _ps_tan_poleval = _mm_set_ps1(3.68935e19f);
-	static const __m128 _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f);
-	static const __m128 _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f);
-	static const __m128 _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f);
-	static const __m128 _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f);
-	static const __m128 _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f);
-	static const __m128 _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f);
-	static const __m128 _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f);
-	static const __m128 _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f);
-
-	static const __m128 _ps_exp_hi = _mm_set_ps1(88.3762626647949f);
-	static const __m128 _ps_exp_lo = _mm_set_ps1(-88.3762626647949f);
-	static const __m128 _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f);
-	static const __m128 _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f);
-	static const __m128 _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f);
-	static const __m128 _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f);
-	static const __m128 _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f);
-	static const __m128 _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f);
-	static const __m128 _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f);
-	static const __m128 _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f);
-	static const __m128 _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f);
-	static const __m128 _ps_exp2_hi = _mm_set_ps1(127.4999961853f);
-	static const __m128 _ps_exp2_lo = _mm_set_ps1(-127.4999961853f);
-	static const __m128 _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f);
-	static const __m128 _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f);
-	static const __m128 _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f);
-	static const __m128 _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f);
-	static const __m128 _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f);
-	static const __m128 _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f);
-	static const __m128 _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f);
-	static const __m128 _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f);
-	static const __m128 _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f);
-	static const __m128 _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f);
-	static const __m128 _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f);
-	static const __m128 _ps_log_c0 = _mm_set_ps1(0.693147180559945f);
-	static const __m128 _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);
+	static const __m128 GLM_VAR_USED abs4Mask = _mm_set_ps1(absMask.f);
+
+	static const __m128 GLM_VAR_USED _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000));
+        //static const __m128 GLM_VAR_USED _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF));
+        //static const __m128 GLM_VAR_USED _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
+        //static const __m128 GLM_VAR_USED _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));
+        //static const __m128 GLM_VAR_USED _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000));
+	static const __m128 GLM_VAR_USED _epi32_0 = _mm_set_ps1(0);
+	static const __m128 GLM_VAR_USED _epi32_1 = _mm_set_ps1(1);
+	static const __m128 GLM_VAR_USED _epi32_2 = _mm_set_ps1(2);
+	static const __m128 GLM_VAR_USED _epi32_3 = _mm_set_ps1(3);
+	static const __m128 GLM_VAR_USED _epi32_4 = _mm_set_ps1(4);
+	static const __m128 GLM_VAR_USED _epi32_5 = _mm_set_ps1(5);
+	static const __m128 GLM_VAR_USED _epi32_6 = _mm_set_ps1(6);
+	static const __m128 GLM_VAR_USED _epi32_7 = _mm_set_ps1(7);
+	static const __m128 GLM_VAR_USED _epi32_8 = _mm_set_ps1(8);
+	static const __m128 GLM_VAR_USED _epi32_9 = _mm_set_ps1(9);
+	static const __m128 GLM_VAR_USED _epi32_127 = _mm_set_ps1(127);
+        //static const __m128 GLM_VAR_USED _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000));
+        //static const __m128 GLM_VAR_USED _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
+
+	static const __m128 GLM_VAR_USED _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f);
+	static const __m128 GLM_VAR_USED _ps_0p5 = _mm_set_ps1(0.5f);
+	static const __m128 GLM_VAR_USED _ps_1 = _mm_set_ps1(1.0f);
+	static const __m128 GLM_VAR_USED _ps_m1 = _mm_set_ps1(-1.0f);
+	static const __m128 GLM_VAR_USED _ps_2 = _mm_set_ps1(2.0f);
+	static const __m128 GLM_VAR_USED _ps_3 = _mm_set_ps1(3.0f);
+	static const __m128 GLM_VAR_USED _ps_127 = _mm_set_ps1(127.0f);
+	static const __m128 GLM_VAR_USED _ps_255 = _mm_set_ps1(255.0f);
+	static const __m128 GLM_VAR_USED _ps_2pow23 = _mm_set_ps1(8388608.0f);
+
+	static const __m128 GLM_VAR_USED _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);
+	static const __m128 GLM_VAR_USED _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f);
+	static const __m128 GLM_VAR_USED _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f);
+	static const __m128 GLM_VAR_USED _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f);
+
+	static const __m128 GLM_VAR_USED _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f);
+	static const __m128 GLM_VAR_USED _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f);
+	static const __m128 GLM_VAR_USED _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f);
+	static const __m128 GLM_VAR_USED _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f);
+	static const __m128 GLM_VAR_USED _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f);
+	static const __m128 GLM_VAR_USED _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f);
+
+	static const __m128 GLM_VAR_USED _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f);
+	static const __m128 GLM_VAR_USED _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f);
+	static const __m128 GLM_VAR_USED _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f);
+	static const __m128 GLM_VAR_USED _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f);
+	static const __m128 GLM_VAR_USED _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f);
+	static const __m128 GLM_VAR_USED _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f);
+	static const __m128 GLM_VAR_USED _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f);
+	static const __m128 GLM_VAR_USED _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f);
+	static const __m128 GLM_VAR_USED _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f);
+	static const __m128 GLM_VAR_USED _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f);
+	static const __m128 GLM_VAR_USED _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f);
+	static const __m128 GLM_VAR_USED _ps_tan_poleval = _mm_set_ps1(3.68935e19f);
+	static const __m128 GLM_VAR_USED _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f);
+	static const __m128 GLM_VAR_USED _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f);
+	static const __m128 GLM_VAR_USED _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f);
+	static const __m128 GLM_VAR_USED _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f);
+	static const __m128 GLM_VAR_USED _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f);
+	static const __m128 GLM_VAR_USED _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f);
+	static const __m128 GLM_VAR_USED _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f);
+	static const __m128 GLM_VAR_USED _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f);
+
+	static const __m128 GLM_VAR_USED _ps_exp_hi = _mm_set_ps1(88.3762626647949f);
+	static const __m128 GLM_VAR_USED _ps_exp_lo = _mm_set_ps1(-88.3762626647949f);
+	static const __m128 GLM_VAR_USED _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f);
+	static const __m128 GLM_VAR_USED _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f);
+	static const __m128 GLM_VAR_USED _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f);
+	static const __m128 GLM_VAR_USED _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f);
+	static const __m128 GLM_VAR_USED _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f);
+	static const __m128 GLM_VAR_USED _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f);
+	static const __m128 GLM_VAR_USED _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f);
+	static const __m128 GLM_VAR_USED _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f);
+	static const __m128 GLM_VAR_USED _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f);
+	static const __m128 GLM_VAR_USED _ps_exp2_hi = _mm_set_ps1(127.4999961853f);
+	static const __m128 GLM_VAR_USED _ps_exp2_lo = _mm_set_ps1(-127.4999961853f);
+	static const __m128 GLM_VAR_USED _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f);
+	static const __m128 GLM_VAR_USED _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f);
+	static const __m128 GLM_VAR_USED _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f);
+	static const __m128 GLM_VAR_USED _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f);
+	static const __m128 GLM_VAR_USED _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f);
+	static const __m128 GLM_VAR_USED _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f);
+	static const __m128 GLM_VAR_USED _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f);
+	static const __m128 GLM_VAR_USED _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f);
+	static const __m128 GLM_VAR_USED _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f);
+	static const __m128 GLM_VAR_USED _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f);
+	static const __m128 GLM_VAR_USED _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f);
+	static const __m128 GLM_VAR_USED _ps_log_c0 = _mm_set_ps1(0.693147180559945f);
+	static const __m128 GLM_VAR_USED _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);
 
 GLM_FUNC_QUALIFIER __m128 sse_abs_ps(__m128 x)
 {
@@ -205,10 +205,11 @@ GLM_FUNC_QUALIFIER __m128 sse_mod_ps(__m128 x, __m128 y)
 }
 
 /// TODO
-//GLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)
-//{
-//    return __m128();
-//}
+GLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)
+{
+	__m128 empty;
+    return empty;
+}
 
 //GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)
 
@@ -252,14 +253,18 @@ GLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
 	return mul2;
 }
 
+/// \todo
 GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)
 {
-
+	__m128 empty;
+    return empty;
 }
 
+/// \todo
 GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)
 {
-
+	__m128 empty;
+    return empty;
 }
 
 // SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration

+ 4 - 4
glm/core/intrinsic_matrix.inl

@@ -10,8 +10,8 @@
 namespace glm{
 namespace detail{
 
-static const __m128 _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f);
-static const __m128 _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);
+static const __m128 GLM_VAR_USED _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f);
+static const __m128 GLM_VAR_USED _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);
 
 template <typename matType>
 GLM_FUNC_QUALIFIER matType sse_comp_mul_ps
@@ -968,7 +968,7 @@ GLM_FUNC_QUALIFIER void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])
 	out[2] = _mm_mul_ps(Inv2, Rcp0);
 	out[3] = _mm_mul_ps(Inv3, Rcp0);
 }
-
+/*
 GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])
 {
 	float a = glm::radians(Angle);
@@ -1038,7 +1038,7 @@ GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float con
 	//return Result;
 	sse_mul_ps(in, Result, out);
 }
-
+*/
 GLM_FUNC_QUALIFIER void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])
 {
 	out[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0)));

+ 6 - 0
glm/core/setup.hpp

@@ -455,6 +455,12 @@
 #	define GLM_CUDA_FUNC_DECL
 #endif
 
+#if GLM_COMPILER & GLM_COMPILER_GCC
+#define GLM_VAR_USED __attribute__ ((unused))
+#else
+#define GLM_VAR_USED
+#endif
+
 #if(defined(GLM_FORCE_INLINE))
 #   if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
 #       define GLM_INLINE __forceinline

+ 6 - 6
glm/core/type_mat2x2.hpp

@@ -80,7 +80,7 @@ namespace glm
 				col_type const & v2);
 
 			//////////////////////////////////////
-			// Convertion constructors
+			// Conversions
 			template <typename U> 
 			GLM_FUNC_DECL explicit tmat2x2(
 				U const & x);
@@ -90,13 +90,13 @@ namespace glm
 				U const & x1, V const & y1, 
 				M const & x2, N const & y2);
 			
-			//template <typename U, typename V, typename M, typename N> 
-			//GLM_FUNC_DECL explicit tmat2x2(
-			//	tvec2<U, V> const & v1, 
-			//	tvec2<M, N> const & v2);
+			template <typename U, typename V> 
+			GLM_FUNC_DECL explicit tmat2x2(
+				tvec2<U> const & v1, 
+				tvec2<V> const & v2);
 
 			//////////////////////////////////////
-			// Conversions
+			// Matrix conversions
 			template <typename U> 
 			GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U> const & m);
 

+ 15 - 15
glm/core/type_mat2x2.inl

@@ -128,31 +128,31 @@ namespace detail
 	}
 	
 	template <typename T> 
-	template <typename U, typename V, typename M, typename N> 
+	template <typename X1, typename Y1, typename X2, typename Y2> 
 	GLM_FUNC_DECL tmat2x2<T>::tmat2x2
 	(
-		U const & x1, V const & y1, 
-		M const & x2, N const & y2
+		X1 const & x1, Y1 const & y1, 
+		X2 const & x2, Y2 const & y2
 	)		
 	{
         this->value[0] = col_type(value_type(x1), value_type(y1));
         this->value[1] = col_type(value_type(x2), value_type(y2));
 	}
 	
-	//template <typename T> 
-	//template <typename U, typename V, typename M, typename N> 
-	//GLM_FUNC_DECL tmat2x2<T>::tmat2x2
-	//(
-	//	tvec2<U, V> const & v1, 
-	//	tvec2<M, N> const & v2
-	//)		
-	//{
- //       this->value[0] = col_type(v1);
- //       this->value[1] = col_type(v2);
-	//}
+	template <typename T> 
+	template <typename V1, typename V2> 
+	GLM_FUNC_DECL tmat2x2<T>::tmat2x2
+	(
+		tvec2<V1> const & v1, 
+		tvec2<V2> const & v2
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+	}
 
     //////////////////////////////////////////////////////////////
-    // mat2x2 conversions
+    // mat2x2 matrix conversions
 
     template <typename T> 
     template <typename U> 

+ 19 - 1
glm/core/type_mat2x3.hpp

@@ -72,7 +72,25 @@ namespace glm
 				col_type const & v0, 
 				col_type const & v1);
 
-			// Conversion
+            
+			//////////////////////////////////////
+			// Conversions
+			template <typename U> 
+			GLM_FUNC_DECL explicit tmat2x3(
+                U const & x);
+			
+			template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2> 
+			GLM_FUNC_DECL explicit tmat2x3(
+                X1 const & x1, Y1 const & y1, Z1 const & z1, 
+                X2 const & x2, Y2 const & y2, Z2 const & z2);
+			
+			template <typename U, typename V> 
+			GLM_FUNC_DECL explicit tmat2x3(
+                tvec3<U> const & v1, 
+                tvec3<V> const & v2);
+            
+			//////////////////////////////////////
+            // Matrix conversion
 			template <typename U> 
 			GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
 

+ 43 - 1
glm/core/type_mat2x3.inl

@@ -112,7 +112,49 @@ namespace detail
         this->value[1] = v1;
     }
 
-    // Conversion
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat2x3<T>::tmat2x3
+	(
+		U const & s
+	)
+	{
+		value_type const Zero(0);
+        this->value[0] = tvec3<T>(value_type(s), Zero, Zero);
+        this->value[1] = tvec3<T>(Zero, value_type(s), Zero);
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, typename Z1, 
+		typename X2, typename Y2, typename Z2> 
+	GLM_FUNC_DECL tmat2x3<T>::tmat2x3
+	(
+		X1 const & x1, Y1 const & y1, Z1 const & z1, 
+		X2 const & x2, Y2 const & y2, Z2 const & z2
+	)		
+	{
+        this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
+        this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2> 
+	GLM_FUNC_DECL tmat2x3<T>::tmat2x3
+	(
+		tvec3<V1> const & v1, 
+		tvec3<V2> const & v2
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+	}
+
+	//////////////////////////////////////
+    // Matrix conversions
+    
     template <typename T> 
     template <typename U> 
     GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3

+ 21 - 2
glm/core/type_mat2x4.hpp

@@ -71,8 +71,27 @@ namespace glm
 			GLM_FUNC_DECL explicit tmat2x4(
 				col_type const & v0, 
 				col_type const & v1);
-
-			// Conversion
+            
+			//////////////////////////////////////
+			// Conversions
+			template <typename U> 
+			GLM_FUNC_DECL explicit tmat2x4(
+                U const & x);
+			
+			template <
+                typename X1, typename Y1, typename Z1, typename W1, 
+                typename X2, typename Y2, typename Z2, typename W2> 
+			GLM_FUNC_DECL explicit tmat2x4(
+                X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, 
+                X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
+			
+			template <typename U, typename V> 
+			GLM_FUNC_DECL explicit tmat2x4(
+                tvec4<U> const & v1, 
+                tvec4<V> const & v2);
+            
+            //////////////////////////////////////
+			// Matrix conversions
 			template <typename U> 
 			GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
 

+ 43 - 1
glm/core/type_mat2x4.inl

@@ -115,7 +115,49 @@ namespace detail
         this->value[1] = v1;
     }
 
-    // Conversion
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat2x4<T>::tmat2x4
+	(
+		U const & s
+	)
+	{
+		value_type const Zero(0);
+        this->value[0] = tvec4<T>(value_type(s), Zero, Zero, Zero);
+        this->value[1] = tvec4<T>(Zero, value_type(s), Zero, Zero);
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, typename Z1, typename W1, 
+		typename X2, typename Y2, typename Z2, typename W2> 
+	GLM_FUNC_DECL tmat2x4<T>::tmat2x4
+	(
+		X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, 
+		X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2 
+	)		
+	{
+        this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
+        this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2> 
+	GLM_FUNC_DECL tmat2x4<T>::tmat2x4
+	(
+		tvec4<V1> const & v1, 
+		tvec4<V2> const & v2
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+	}
+
+	//////////////////////////////////////
+    // Matrix conversions
+    
     template <typename T> 
     template <typename U> 
     GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4

+ 24 - 1
glm/core/type_mat3x2.hpp

@@ -74,7 +74,30 @@ namespace glm
 				col_type const & v1,
 				col_type const & v2);
 
-			// Conversion
+			//////////////////////////////////////
+			// Conversions
+			template <typename U> 
+			GLM_FUNC_DECL explicit tmat3x2(
+                U const & x);
+			
+			template 
+            <
+                typename X1, typename Y1, 
+                typename X2, typename Y2, 
+                typename X3, typename Y3
+            > 
+			GLM_FUNC_DECL explicit tmat3x2(
+                X1 const & x1, Y1 const & y1, 
+                X2 const & x2, Y2 const & y2,
+                X3 const & x3, Y3 const & y3);
+			
+			template <typename V1, typename V2, typename V3> 
+			GLM_FUNC_DECL explicit tmat3x2(
+                tvec2<V1> const & v1, 
+                tvec2<V2> const & v2,
+                tvec2<V3> const & v3);
+            
+			// Matrix conversions
 			template <typename U> 
 			GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U> const & m);
 

+ 49 - 1
glm/core/type_mat3x2.inl

@@ -119,7 +119,55 @@ namespace detail
         this->value[2] = v2;
     }
 
-    // Conversion
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat3x2<T>::tmat3x2
+	(
+		U const & s
+	)
+	{
+		value_type const Zero(0);
+        this->value[0] = tvec2<T>(value_type(s), Zero);
+        this->value[1] = tvec2<T>(Zero, value_type(s));
+        this->value[2] = tvec2<T>(Zero);
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, 
+		typename X2, typename Y2, 
+		typename X3, typename Y3> 
+	GLM_FUNC_DECL tmat3x2<T>::tmat3x2
+	(
+		X1 const & x1, Y1 const & y1, 
+		X2 const & x2, Y2 const & y2, 
+		X3 const & x3, Y3 const & y3
+	)		
+	{
+        this->value[0] = col_type(value_type(x1), value_type(y1));
+        this->value[1] = col_type(value_type(x2), value_type(y2));
+        this->value[2] = col_type(value_type(x3), value_type(y3));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2, typename V3> 
+	GLM_FUNC_DECL tmat3x2<T>::tmat3x2
+	(
+		tvec2<V1> const & v1, 
+		tvec2<V2> const & v2, 
+		tvec2<V3> const & v3
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+        this->value[2] = col_type(v3);
+	}
+
+    //////////////////////////////////////////////////////////////
+    // mat3x2 matrix conversions
+
     template <typename T> 
     template <typename U> 
     GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2

+ 23 - 0
glm/core/type_mat3x3.hpp

@@ -78,8 +78,31 @@ namespace glm
 				col_type const & v1,
 				col_type const & v2);
 
+			//////////////////////////////////////
 			// Conversions
 			template <typename U> 
+			GLM_FUNC_DECL explicit tmat3x3(
+                U const & x);
+			
+			template 
+            <
+                typename X1, typename Y1, typename Z1, 
+                typename X2, typename Y2, typename Z2, 
+                typename X3, typename Y3, typename Z3
+            > 
+			GLM_FUNC_DECL explicit tmat3x3(
+                X1 const & x1, Y1 const & y1, Z1 const & z1, 
+                X2 const & x2, Y2 const & y2, Z2 const & z2, 
+                X3 const & x3, Y3 const & y3, Z3 const & z3);
+			
+			template <typename V1, typename V2, typename V3> 
+			GLM_FUNC_DECL explicit tmat3x3(
+                tvec3<V1> const & v1, 
+                tvec3<V2> const & v2,
+                tvec3<V3> const & v3);
+            
+			// Matrix conversions
+			template <typename U> 
 			GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
 
 			GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);

+ 46 - 0
glm/core/type_mat3x3.inl

@@ -122,6 +122,52 @@ namespace detail
         this->value[2] = v2;
     }
 
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat3x3<T>::tmat3x3
+	(
+		U const & s
+	)
+	{
+		value_type const Zero(0);
+        this->value[0] = tvec3<T>(value_type(s), Zero, Zero);
+        this->value[1] = tvec3<T>(Zero, value_type(s), Zero);
+        this->value[2] = tvec3<T>(Zero, Zero, value_type(s));
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, typename Z1, 
+		typename X2, typename Y2, typename Z2, 
+		typename X3, typename Y3, typename Z3>  
+	GLM_FUNC_DECL tmat3x3<T>::tmat3x3
+	(
+		X1 const & x1, Y1 const & y1, Z1 const & z1, 
+		X2 const & x2, Y2 const & y2, Z2 const & z2, 
+		X3 const & x3, Y3 const & y3, Z3 const & z3 
+	)		
+	{
+        this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
+        this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
+        this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2, typename V3> 
+	GLM_FUNC_DECL tmat3x3<T>::tmat3x3
+	(
+		tvec3<V1> const & v1, 
+		tvec3<V2> const & v2, 
+		tvec3<V3> const & v3
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+        this->value[2] = col_type(v3);
+	}
+
     //////////////////////////////////////////////////////////////
     // Conversions
 

+ 24 - 1
glm/core/type_mat3x4.hpp

@@ -74,7 +74,30 @@ namespace glm
 				col_type const & v1,
 				col_type const & v2);
 
-			// Conversion
+			//////////////////////////////////////
+			// Conversions
+			template <typename U> 
+			GLM_FUNC_DECL explicit tmat3x4(
+                U const & x);
+			
+			template 
+            <
+                typename X1, typename Y1, typename Z1, typename W1, 
+                typename X2, typename Y2, typename Z2, typename W2, 
+                typename X3, typename Y3, typename Z3, typename W3 
+            > 
+			GLM_FUNC_DECL explicit tmat3x4(
+                X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, 
+                X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, 
+                X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
+			
+			template <typename V1, typename V2, typename V3> 
+			GLM_FUNC_DECL explicit tmat3x4(
+                tvec4<V1> const & v1, 
+                tvec4<V2> const & v2,
+                tvec4<V3> const & v3);
+            
+			// Matrix conversion
 			template <typename U> 
 			GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);
 

+ 46 - 0
glm/core/type_mat3x4.inl

@@ -120,6 +120,52 @@ namespace detail
         this->value[2] = v2;
     }
 
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat3x4<T>::tmat3x4
+	(
+		U const & s
+	)
+	{
+		value_type const Zero(0);
+        this->value[0] = tvec4<T>(value_type(s), Zero, Zero, Zero);
+        this->value[1] = tvec4<T>(Zero, value_type(s), Zero, Zero);
+        this->value[2] = tvec4<T>(Zero, Zero, value_type(s), Zero);
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, typename Z1, typename W1, 
+		typename X2, typename Y2, typename Z2, typename W2, 
+		typename X3, typename Y3, typename Z3, typename W3>  
+	GLM_FUNC_DECL tmat3x4<T>::tmat3x4
+	(
+		X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, 
+		X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, 
+		X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3  
+	)		
+	{
+        this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
+        this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
+        this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2, typename V3> 
+	GLM_FUNC_DECL tmat3x4<T>::tmat3x4
+	(
+		tvec4<V1> const & v1, 
+		tvec4<V2> const & v2, 
+		tvec4<V3> const & v3
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+        this->value[2] = col_type(v3);
+	}
+
     // Conversion
     template <typename T> 
     template <typename U> 

+ 27 - 1
glm/core/type_mat4x2.hpp

@@ -75,9 +75,35 @@ namespace glm
 				col_type const & v1,
 				col_type const & v2,
 				col_type const & v3);
-
+            
+			//////////////////////////////////////
 			// Conversions
 			template <typename U> 
+			GLM_FUNC_DECL explicit tmat4x2(
+                U const & x);
+			
+			template 
+            <
+                typename X1, typename Y1, 
+                typename X2, typename Y2, 
+                typename X3, typename Y3,
+                typename X4, typename Y4
+            > 
+			GLM_FUNC_DECL explicit tmat4x2(
+                X1 const & x1, Y1 const & y1, 
+                X2 const & x2, Y2 const & y2,
+                X3 const & x3, Y3 const & y3,
+                X4 const & x4, Y4 const & y4);
+			
+			template <typename V1, typename V2, typename V3, typename V4> 
+			GLM_FUNC_DECL explicit tmat4x2(
+                tvec2<V1> const & v1, 
+                tvec2<V2> const & v2,
+                tvec2<V3> const & v3,
+                tvec2<V4> const & v4);
+            
+			// Matrix conversions
+			template <typename U> 
 			GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
 			
 			GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x);

+ 52 - 0
glm/core/type_mat4x2.inl

@@ -129,6 +129,58 @@ namespace detail
         this->value[3] = v3;
     }
 
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat4x2<T>::tmat4x2
+	(
+		U const & s
+	)
+	{
+		value_type const Zero(0);
+        this->value[0] = tvec2<T>(value_type(s), Zero);
+        this->value[1] = tvec2<T>(Zero, value_type(s));
+        this->value[2] = tvec2<T>(Zero, Zero);
+        this->value[3] = tvec2<T>(Zero, Zero);
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, 
+		typename X2, typename Y2, 
+		typename X3, typename Y3, 
+		typename X4, typename Y4>  
+	GLM_FUNC_DECL tmat4x2<T>::tmat4x2
+	(
+		X1 const & x1, Y1 const & y1, 
+		X2 const & x2, Y2 const & y2,
+		X3 const & x3, Y3 const & y3,
+		X4 const & x4, Y4 const & y4
+	)		
+	{
+        this->value[0] = col_type(value_type(x1), value_type(y1));
+        this->value[1] = col_type(value_type(x2), value_type(y2));
+        this->value[2] = col_type(value_type(x3), value_type(y3));
+		this->value[3] = col_type(value_type(x4), value_type(y4));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2, typename V3, typename V4> 
+	GLM_FUNC_DECL tmat4x2<T>::tmat4x2
+	(
+		tvec2<V1> const & v1, 
+		tvec2<V2> const & v2, 
+		tvec2<V3> const & v3,
+		tvec2<V4> const & v4
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+        this->value[2] = col_type(v3);
+		this->value[3] = col_type(v4);
+	}
+
     // Conversion
     template <typename T> 
     template <typename U> 

+ 27 - 3
glm/core/type_mat4x3.hpp

@@ -74,9 +74,33 @@ namespace glm
 				col_type const & v0, 
 				col_type const & v1,
 				col_type const & v2,
-				col_type const & v3);
-
-			// Conversion
+                col_type const & v3);
+            
+			//////////////////////////////////////
+			// Conversions
+			template <typename U> 
+			GLM_FUNC_DECL explicit tmat4x3(
+                U const & x);
+			
+			template <
+                typename X1, typename Y1, typename Z1, 
+                typename X2, typename Y2, typename Z2, 
+                typename X3, typename Y3, typename Z3, 
+                typename X4, typename Y4, typename Z4> 
+			GLM_FUNC_DECL explicit tmat4x3(
+                X1 const & x1, Y1 const & y1, Z1 const & z1, 
+                X2 const & x2, Y2 const & y2, Z2 const & z2, 
+                X3 const & x3, Y3 const & y3, Z3 const & z3, 
+                X4 const & x4, Y4 const & y4, Z4 const & z4);
+			
+			template <typename V1, typename V2, typename V3, typename V4> 
+			GLM_FUNC_DECL explicit tmat4x3(
+                tvec3<V1> const & v1, 
+                tvec3<V2> const & v2,
+                tvec3<V3> const & v3,
+                tvec3<V4> const & v4);
+            
+			// Matrix conversions
 			template <typename U> 
 			GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m);
 			

+ 53 - 1
glm/core/type_mat4x3.inl

@@ -129,8 +129,60 @@ namespace detail
         this->value[3] = v3;
     }
 
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat4x3<T>::tmat4x3
+	(
+		U const & s
+	)
+	{
+		value_type const Zero(0);
+        this->value[0] = tvec3<T>(value_type(s), Zero, Zero);
+        this->value[1] = tvec3<T>(Zero, value_type(s), Zero);
+        this->value[2] = tvec3<T>(Zero, Zero, value_type(s));
+        this->value[3] = tvec3<T>(Zero, Zero, Zero);
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, typename Z1, 
+		typename X2, typename Y2, typename Z2, 
+		typename X3, typename Y3, typename Z3, 
+		typename X4, typename Y4, typename Z4>  
+	GLM_FUNC_DECL tmat4x3<T>::tmat4x3
+	(
+		X1 const & x1, Y1 const & y1, Z1 const & z1, 
+		X2 const & x2, Y2 const & y2, Z2 const & z2, 
+		X3 const & x3, Y3 const & y3, Z3 const & z3, 
+		X4 const & x4, Y4 const & y4, Z4 const & z4
+	)		
+	{
+        this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
+        this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
+        this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3));
+		this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2, typename V3, typename V4> 
+	GLM_FUNC_DECL tmat4x3<T>::tmat4x3
+	(
+		tvec3<V1> const & v1, 
+		tvec3<V2> const & v2, 
+		tvec3<V3> const & v3,
+		tvec3<V4> const & v4
+	)		
+	{
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+        this->value[2] = col_type(v3);
+		this->value[3] = col_type(v4);
+	}
+
     //////////////////////////////////////////////////////////////
-    // Conversions
+    // Matrix conversions
 
     template <typename T> 
     template <typename U> 

+ 24 - 0
glm/core/type_mat4x4.hpp

@@ -80,8 +80,32 @@ namespace glm
 				col_type const & v2,
 				col_type const & v3);
 
+			//////////////////////////////////////
 			// Conversions
 			template <typename U> 
+			GLM_FUNC_DECL explicit tmat4x4(
+                U const & x);
+			
+			template <
+                typename X1, typename Y1, typename Z1, typename W1, 
+                typename X2, typename Y2, typename Z2, typename W2, 
+                typename X3, typename Y3, typename Z3, typename W3, 
+                typename X4, typename Y4, typename Z4, typename W4> 
+			GLM_FUNC_DECL explicit tmat4x4(
+                X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, 
+                X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, 
+                X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, 
+                X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
+			
+			template <typename V1, typename V2, typename V3, typename V4> 
+			GLM_FUNC_DECL explicit tmat4x4(
+                tvec4<V1> const & v1, 
+                tvec4<V2> const & v2,
+                tvec4<V3> const & v3,
+                tvec4<V4> const & v4);
+            
+			// Matrix conversions
+			template <typename U> 
 			GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
 
 			GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);

+ 81 - 0
glm/core/type_mat4x4.inl

@@ -142,6 +142,87 @@ namespace detail
         this->value[3] = col_type(m[3]);
 	}
 
+	//////////////////////////////////////
+	// Convertion constructors
+	template <typename T> 
+	template <typename U> 
+	GLM_FUNC_DECL tmat4x4<T>::tmat4x4
+	(
+		U const & s
+	)
+	{
+		GLM_STATIC_ASSERT(detail::type<U>::is_float || std::numeric_limits<U>::is_integer, "*mat4x4 constructor only takes float and integer types");
+
+		value_type const Zero(0);
+        this->value[0] = tvec4<T>(value_type(s), Zero, Zero, Zero);
+        this->value[1] = tvec4<T>(Zero, value_type(s), Zero, Zero);
+        this->value[2] = tvec4<T>(Zero, Zero, value_type(s), Zero);
+        this->value[3] = tvec4<T>(Zero, Zero, Zero, value_type(s));
+	}
+	
+	template <typename T> 
+	template <
+		typename X1, typename Y1, typename Z1, typename W1, 
+		typename X2, typename Y2, typename Z2, typename W2, 
+		typename X3, typename Y3, typename Z3, typename W3, 
+		typename X4, typename Y4, typename Z4, typename W4>  
+	GLM_FUNC_DECL tmat4x4<T>::tmat4x4
+	(
+		X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, 
+		X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, 
+		X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, 
+		X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4
+	)		
+	{
+		GLM_STATIC_ASSERT(detail::type<X1>::is_float || std::numeric_limits<X1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Y1>::is_float || std::numeric_limits<Y1>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Z1>::is_float || std::numeric_limits<Z1>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<W1>::is_float || std::numeric_limits<W1>::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.");
+
+		GLM_STATIC_ASSERT(detail::type<X2>::is_float || std::numeric_limits<X2>::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Y2>::is_float || std::numeric_limits<Y2>::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Z2>::is_float || std::numeric_limits<Z2>::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<W2>::is_float || std::numeric_limits<W2>::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid.");
+
+		GLM_STATIC_ASSERT(detail::type<X3>::is_float || std::numeric_limits<X3>::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Y3>::is_float || std::numeric_limits<Y3>::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Z3>::is_float || std::numeric_limits<Z3>::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<W3>::is_float || std::numeric_limits<W3>::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid.");
+
+		GLM_STATIC_ASSERT(detail::type<X4>::is_float || std::numeric_limits<X4>::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Y4>::is_float || std::numeric_limits<Y4>::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<Z4>::is_float || std::numeric_limits<Z4>::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<W4>::is_float || std::numeric_limits<W4>::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid.");
+
+        this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
+        this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
+        this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3));
+		this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4), value_type(w4));
+	}
+	
+	template <typename T> 
+	template <typename V1, typename V2, typename V3, typename V4> 
+	GLM_FUNC_DECL tmat4x4<T>::tmat4x4
+	(
+		tvec4<V1> const & v1, 
+		tvec4<V2> const & v2, 
+		tvec4<V3> const & v3,
+		tvec4<V4> const & v4
+	)		
+	{
+		GLM_STATIC_ASSERT(detail::type<V1>::is_float || std::numeric_limits<V1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<V2>::is_float || std::numeric_limits<V2>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<V3>::is_float || std::numeric_limits<V3>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
+		GLM_STATIC_ASSERT(detail::type<V4>::is_float || std::numeric_limits<V4>::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.");
+
+        this->value[0] = col_type(v1);
+        this->value[1] = col_type(v2);
+        this->value[2] = col_type(v3);
+		this->value[3] = col_type(v4);
+	}
+
+	//////////////////////////////////////
+	// Matrix convertion constructors
     template <typename T> 
     GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
 	(

+ 12 - 12
glm/gtx/quaternion.inl

@@ -256,28 +256,28 @@ namespace quaternion
         if(a <= typename detail::tquat<T>::value_type(0)) return x;
         if(a >= typename detail::tquat<T>::value_type(1)) return y;
 
-        detail::tquat<T>::value_type fCos = dot(x, y);
+		T fCos = dot(x, y);
         detail::tquat<T> y2(y); //BUG!!! tquat<T> y2;
-        if(fCos < typename detail::tquat<T>::value_type(0))
+		if(fCos < T(0))
         {
             y2 = -y;
             fCos = -fCos;
         }
 
         //if(fCos > 1.0f) // problem
-        detail::tquat<T>::value_type k0, k1;
-        if(fCos > typename detail::tquat<T>::value_type(0.9999))
+		T k0, k1;
+		if(fCos > T(0.9999))
         {
-            k0 = typename detail::tquat<T>::value_type(1) - a;
-            k1 = typename detail::tquat<T>::value_type(0) + a; //BUG!!! 1.0f + a;
+			k0 = T(1) - a;
+			k1 = T(0) + a; //BUG!!! 1.0f + a;
         }
         else
         {
-            typename detail::tquat<T>::value_type fSin = sqrt(T(1) - fCos * fCos);
-            typename detail::tquat<T>::value_type fAngle = atan(fSin, fCos);
-            typename detail::tquat<T>::value_type fOneOverSin = T(1) / fSin;
-            k0 = sin((typename detail::tquat<T>::value_type(1) - a) * fAngle) * fOneOverSin;
-            k1 = sin((typename detail::tquat<T>::value_type(0) + a) * fAngle) * fOneOverSin;
+			T fSin = sqrt(T(1) - fCos * fCos);
+			T fAngle = atan(fSin, fCos);
+			T fOneOverSin = T(1) / fSin;
+			k0 = sin((T(1) - a) * fAngle) * fOneOverSin;
+			k1 = sin((T(0) + a) * fAngle) * fOneOverSin;
         }
 
         return detail::tquat<T>(
@@ -295,7 +295,7 @@ namespace quaternion
 		T const & a
 	)
     {
-		return glm::normalize(x * (detail::tquat<T>::value_type(1) - a) + (y * a));
+		return glm::normalize(x * (T(1) - a) + (y * a));
 	}
 
 }//namespace quaternion

+ 15 - 8
readme.txt

@@ -37,7 +37,14 @@ More informations in GLM manual:
 http://glm.g-truc.net/glm-0.9.2.pdf
 
 ================================================================================
-GLM 0.9.2.1: 2010-05-24
+GLM 0.9.2.2: 2011-06-XX
+--------------------------------------------------------------------------------
+- Expend matrix constructors flexibility
+- Improved quaternion implementation
+- Fixed many warnings across platforms and compilers
+
+================================================================================
+GLM 0.9.2.1: 2011-05-24
 --------------------------------------------------------------------------------
 - Automatically detect CUDA support
 - Improved compiler detection
@@ -46,7 +53,7 @@ GLM 0.9.2.1: 2010-05-24
 - Fixed and tested GLM_GTX_rotate_vector
 
 ================================================================================
-GLM 0.9.2.0: 2010-05-09
+GLM 0.9.2.0: 2011-05-09
 --------------------------------------------------------------------------------
 - Added CUDA support
 - Added CTest test suite
@@ -56,27 +63,27 @@ GLM 0.9.2.0: 2010-05-09
 - Updated quaternion slerp interpolation
 
 ================================================================================
-GLM 0.9.1.3: 2010-05-07
+GLM 0.9.1.3: 2011-05-07
 --------------------------------------------------------------------------------
 - Fixed bugs
 
 ================================================================================
-GLM 0.9.1.2: 2010-04-15
+GLM 0.9.1.2: 2011-04-15
 --------------------------------------------------------------------------------
 - Fixed bugs
 
 ================================================================================
-GLM 0.9.1.1: 2010-03-17
+GLM 0.9.1.1: 2011-03-17
 --------------------------------------------------------------------------------
 - Fixed bugs
 
 ================================================================================
-GLM 0.9.1.0: 2010-03-03
+GLM 0.9.1.0: 2011-03-03
 --------------------------------------------------------------------------------
 - Fixed bugs
 
 ================================================================================
-GLM 0.9.1.B: 2010-02-13
+GLM 0.9.1.B: 2011-02-13
 --------------------------------------------------------------------------------
 - Updated API documentation
 - Improved SIMD implementation
@@ -89,7 +96,7 @@ GLM 0.9.0.8: 2011-02-13
 - Clarify that GLM is a header only library.
 
 ================================================================================
-GLM 0.9.1.A: 2010-01-31
+GLM 0.9.1.A: 2011-01-31
 --------------------------------------------------------------------------------
 - Added SIMD support
 - Added new swizzle functions