Browse Source

Removing old vector math.

Branimir Karadžić 7 years ago
parent
commit
66a7d6ab05

+ 2 - 2
examples/01-cubes/cubes.cpp

@@ -273,8 +273,8 @@ public:
 
 
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 
 
-			float at[3]  = { 0.0f, 0.0f,   0.0f };
-			float eye[3] = { 0.0f, 0.0f, -35.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{

+ 2 - 2
examples/02-metaballs/metaballs.cpp

@@ -579,8 +579,8 @@ public:
 			const double toMs = 1000.0/freq;
 			const double toMs = 1000.0/freq;
 			float time = (float)( (now - m_timeOffset)/double(bx::getHPFrequency() ) );
 			float time = (float)( (now - m_timeOffset)/double(bx::getHPFrequency() ) );
 
 
-			float at[3]  = { 0.0f, 0.0f,   0.0f };
-			float eye[3] = { 0.0f, 0.0f, -50.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -50.0f };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{

+ 2 - 2
examples/03-raymarch/raymarch.cpp

@@ -192,8 +192,8 @@ public:
 			// if no other draw calls are submitted to viewZ 0.
 			// if no other draw calls are submitted to viewZ 0.
 			bgfx::touch(0);
 			bgfx::touch(0);
 
 
-			float at[3]  = { 0.0f, 0.0f,   0.0f };
-			float eye[3] = { 0.0f, 0.0f, -15.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -15.0f };
 
 
 			float view[16];
 			float view[16];
 			float proj[16];
 			float proj[16];

+ 2 - 2
examples/04-mesh/mesh.cpp

@@ -103,8 +103,8 @@ public:
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 			bgfx::setUniform(u_time, &time);
 			bgfx::setUniform(u_time, &time);
 
 
-			float at[3]  = { 0.0f, 1.0f,  0.0f };
-			float eye[3] = { 0.0f, 1.0f, -2.5f };
+			const bx::Vec3 at  = { 0.0f, 1.0f,  0.0f };
+			const bx::Vec3 eye = { 0.0f, 1.0f, -2.5f };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{

+ 2 - 2
examples/05-instancing/instancing.cpp

@@ -172,8 +172,8 @@ public:
 			}
 			}
 			else
 			else
 			{
 			{
-				float at[3]  = { 0.0f, 0.0f,   0.0f };
-				float eye[3] = { 0.0f, 0.0f, -35.0f };
+				const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+				const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 				// Set view and projection matrix for view 0.
 				// Set view and projection matrix for view 0.
 				{
 				{

+ 2 - 2
examples/06-bump/bump.cpp

@@ -211,8 +211,8 @@ public:
 
 
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ));
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ));
 
 
-			float at[3]  = { 0.0f, 0.0f,  0.0f };
-			float eye[3] = { 0.0f, 0.0f, -7.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,  0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -7.0f };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{

+ 2 - 2
examples/07-callback/callback.cpp

@@ -423,8 +423,8 @@ public:
 			// if no other draw calls are submitted to view 0.
 			// if no other draw calls are submitted to view 0.
 			bgfx::touch(0);
 			bgfx::touch(0);
 
 
-			float at[3]  = { 0.0f, 0.0f,   0.0f };
-			float eye[3] = { 0.0f, 0.0f, -35.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 			float view[16];
 			float view[16];
 			float proj[16];
 			float proj[16];

+ 2 - 2
examples/08-update/update.cpp

@@ -484,8 +484,8 @@ public:
 				}
 				}
 			}
 			}
 
 
-			float at[3]  = { 0.0f, 0.0f,  0.0f };
-			float eye[3] = { 0.0f, 0.0f, -5.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,  0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -5.0f };
 
 
 			float view[16];
 			float view[16];
 			bx::mtxLookAt(view, eye, at);
 			bx::mtxLookAt(view, eye, at);

+ 4 - 5
examples/09-hdr/hdr.cpp

@@ -469,8 +469,8 @@ public:
 				bgfx::setViewTransform(ii, NULL, proj);
 				bgfx::setViewTransform(ii, NULL, proj);
 			}
 			}
 
 
-			float at[3]  = { 0.0f, 1.0f, 0.0f };
-			float eye[3] = { 0.0f, 1.0f, -2.5f };
+			const bx::Vec3 at  = { 0.0f, 1.0f,  0.0f };
+			const bx::Vec3 eye = { 0.0f, 1.0f, -2.5f };
 
 
 			float mtx[16];
 			float mtx[16];
 			bx::mtxRotateXY(mtx
 			bx::mtxRotateXY(mtx
@@ -478,11 +478,10 @@ public:
 					, m_time
 					, m_time
 					);
 					);
 
 
-			float temp[4];
-			bx::vec3MulMtx(temp, eye, mtx);
+			const bx::Vec3 tmp = bx::mul(eye, mtx);
 
 
 			float view[16];
 			float view[16];
-			bx::mtxLookAt(view, temp, at);
+			bx::mtxLookAt(view, tmp, at);
 			bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f, caps->homogeneousDepth);
 			bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f, caps->homogeneousDepth);
 
 
 			// Set view and projection matrix for view hdrMesh.
 			// Set view and projection matrix for view hdrMesh.

+ 2 - 2
examples/10-font/font.cpp

@@ -258,8 +258,8 @@ public:
 			m_textBufferManager->appendText(m_transientText, m_visitor10, "text buffer\n");
 			m_textBufferManager->appendText(m_transientText, m_visitor10, "text buffer\n");
 			m_textBufferManager->appendText(m_transientText, m_visitor10, fpsText);
 			m_textBufferManager->appendText(m_transientText, m_visitor10, fpsText);
 
 
-			float at[3]  = { 0, 0,  0.0f };
-			float eye[3] = { 0, 0, -1.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,  0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -1.0f };
 
 
 			float view[16];
 			float view[16];
 			bx::mtxLookAt(view, eye, at);
 			bx::mtxLookAt(view, eye, at);

+ 2 - 2
examples/11-fontsdf/fontsdf.cpp

@@ -191,8 +191,8 @@ public:
 			// if no other draw calls are submitted to view 0.
 			// if no other draw calls are submitted to view 0.
 			bgfx::touch(0);
 			bgfx::touch(0);
 
 
-			float at[3]  = { 0.0f, 0.0f,  0.0f };
-			float eye[3] = { 0.0f, 0.0f, -1.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,  0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -1.0f };
 
 
 			float view[16];
 			float view[16];
 			bx::mtxLookAt(view, eye, at);
 			bx::mtxLookAt(view, eye, at);

+ 4 - 4
examples/12-lod/lod.cpp

@@ -176,8 +176,8 @@ public:
 			// if no other draw calls are submitted to view 0.
 			// if no other draw calls are submitted to view 0.
 			bgfx::touch(0);
 			bgfx::touch(0);
 
 
-			float at[3]  = { 0.0f, 1.0f,      0.0f };
-			float eye[3] = { 0.0f, 2.0f, -distance };
+			const bx::Vec3 at  = { 0.0f, 1.0f,      0.0f };
+			const bx::Vec3 eye = { 0.0f, 2.0f, -distance };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{
@@ -245,12 +245,12 @@ public:
 			}
 			}
 
 
 			int lod = 0;
 			int lod = 0;
-			if (eye[2] < -2.5f)
+			if (eye.z < -2.5f)
 			{
 			{
 				lod = 1;
 				lod = 1;
 			}
 			}
 
 
-			if (eye[2] < -5.0f)
+			if (eye.z < -5.0f)
 			{
 			{
 				lod = 2;
 				lod = 2;
 			}
 			}

+ 4 - 5
examples/15-shadowmaps-simple/shadowmaps_simple.cpp

@@ -213,8 +213,8 @@ public:
 
 
 		// Set view and projection matrices.
 		// Set view and projection matrices.
 
 
-		float eye[3] = { 0.0f, 30.0f, -60.0f };
-		float at[3]  = { 0.0f,  5.0f,   0.0f };
+		const bx::Vec3 at  = { 0.0f,  5.0f,   0.0f };
+		const bx::Vec3 eye = { 0.0f, 30.0f, -60.0f };
 		bx::mtxLookAt(m_view, eye, at);
 		bx::mtxLookAt(m_view, eye, at);
 
 
 		const float aspect = float(int32_t(m_width) ) / float(int32_t(m_height) );
 		const float aspect = float(int32_t(m_width) ) / float(int32_t(m_height) );
@@ -319,9 +319,8 @@ public:
 			float lightView[16];
 			float lightView[16];
 			float lightProj[16];
 			float lightProj[16];
 
 
-			float eye[3] = { -lightPos[0], -lightPos[1], -lightPos[2] };
-			float at[3]  = { 0.0f,  0.0f,   0.0f };
-
+			const bx::Vec3 at  = { 0.0f,  0.0f,   0.0f };
+			const bx::Vec3 eye = { -lightPos[0], -lightPos[1], -lightPos[2] };
 			bx::mtxLookAt(lightView, eye, at);
 			bx::mtxLookAt(lightView, eye, at);
 
 
 			const bgfx::Caps* caps = bgfx::getCaps();
 			const bgfx::Caps* caps = bgfx::getCaps();

+ 6 - 6
examples/16-shadowmaps/shadowmaps.cpp

@@ -2335,7 +2335,7 @@ public:
 
 
 				float at[3];
 				float at[3];
 				bx::vec3Add(at, m_pointLight.m_position.m_v, m_pointLight.m_spotDirectionInner.m_v);
 				bx::vec3Add(at, m_pointLight.m_position.m_v, m_pointLight.m_spotDirectionInner.m_v);
-				bx::mtxLookAt(lightView[TetrahedronFaces::Green], m_pointLight.m_position.m_v, at);
+				bx::mtxLookAt(lightView[TetrahedronFaces::Green], bx::load(m_pointLight.m_position.m_v), bx::load(at) );
 			}
 			}
 			else if (LightType::PointLight == m_settings.m_lightType)
 			else if (LightType::PointLight == m_settings.m_lightType)
 			{
 			{
@@ -2421,13 +2421,13 @@ public:
 			else // LightType::DirectionalLight == settings.m_lightType
 			else // LightType::DirectionalLight == settings.m_lightType
 			{
 			{
 				// Setup light view mtx.
 				// Setup light view mtx.
-				float eye[3] =
+				const bx::Vec3 at = { 0.0f, 0.0f, 0.0f };
+				const bx::Vec3 eye =
 				{
 				{
-					-m_directionalLight.m_position.m_x
-					, -m_directionalLight.m_position.m_y
-					, -m_directionalLight.m_position.m_z
+					-m_directionalLight.m_position.m_x,
+					-m_directionalLight.m_position.m_y,
+					-m_directionalLight.m_position.m_z,
 				};
 				};
-				float at[3] = { 0.0f, 0.0f, 0.0f };
 				bx::mtxLookAt(lightView[0], eye, at);
 				bx::mtxLookAt(lightView[0], eye, at);
 
 
 				// Compute camera inverse view mtx.
 				// Compute camera inverse view mtx.

+ 2 - 2
examples/17-drawstress/drawstress.cpp

@@ -375,8 +375,8 @@ public:
 
 
 			imguiEndFrame();
 			imguiEndFrame();
 
 
-			float at[3] = { 0.0f, 0.0f, 0.0f };
-			float eye[3] = { 0.0f, 0.0f, -35.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 			float view[16];
 			float view[16];
 			bx::mtxLookAt(view, eye, at);
 			bx::mtxLookAt(view, eye, at);

+ 1 - 1
examples/18-ibl/ibl.cpp

@@ -205,7 +205,7 @@ struct Camera
 
 
 	void mtxLookAt(float* _outViewMtx)
 	void mtxLookAt(float* _outViewMtx)
 	{
 	{
-		bx::mtxLookAt(_outViewMtx, m_pos.curr, m_target.curr);
+		bx::mtxLookAt(_outViewMtx, bx::load(m_pos.curr), bx::load(m_target.curr) );
 	}
 	}
 
 
 	void orbit(float _dx, float _dy)
 	void orbit(float _dx, float _dy)

+ 2 - 2
examples/19-oit/oit.cpp

@@ -351,8 +351,8 @@ public:
 				// http://jcgt.org/published/0002/02/09/
 				// http://jcgt.org/published/0002/02/09/
 				// http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html
 				// http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html
 
 
-				float at[3] = { 0.0f, 0.0f, 0.0f };
-				float eye[3] = { 0.0f, 0.0f, -7.0f };
+				const bx::Vec3 at  = { 0.0f, 0.0f,  0.0f };
+				const bx::Vec3 eye = { 0.0f, 0.0f, -7.0f };
 
 
 				float view[16];
 				float view[16];
 				float proj[16];
 				float proj[16];

+ 2 - 2
examples/22-windows/windows.cpp

@@ -230,8 +230,8 @@ public:
 				}
 				}
 			}
 			}
 
 
-			float at[3]  = { 0.0f, 0.0f,   0.0f };
-			float eye[3] = { 0.0f, 0.0f, -35.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 			float view[16];
 			float view[16];
 			bx::mtxLookAt(view, eye, at);
 			bx::mtxLookAt(view, eye, at);

+ 2 - 2
examples/23-vectordisplay/main.cpp

@@ -119,8 +119,8 @@ public:
 				m_vd.resize(uint16_t(m_width), uint16_t(m_height) );
 				m_vd.resize(uint16_t(m_width), uint16_t(m_height) );
 			}
 			}
 
 
-			const float at[3]  = { 0.0f, 0.0f,   0.0f };
-			const float eye[3] = { 0.0f, 0.0f, -35.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 			float view[16];
 			float view[16];
 			float proj[16];
 			float proj[16];

+ 2 - 2
examples/26-occlusion/occlusion.cpp

@@ -219,8 +219,8 @@ public:
 					bgfx::setViewTransform(1, view, proj);
 					bgfx::setViewTransform(1, view, proj);
 					bgfx::setViewRect(1, 0, 0, uint16_t(m_width), uint16_t(m_height) );
 					bgfx::setViewRect(1, 0, 0, uint16_t(m_width), uint16_t(m_height) );
 
 
-					float at[3]  = {  0.0f,  0.0f,   0.0f };
-					float eye[3] = { 17.5f, 10.0f, -17.5f };
+					const bx::Vec3 at  = {  0.0f,  0.0f,   0.0f };
+					const bx::Vec3 eye = { 17.5f, 10.0f, -17.5f };
 					bx::mtxLookAt(view, eye, at);
 					bx::mtxLookAt(view, eye, at);
 
 
 					bgfx::setViewTransform(2, view, proj);
 					bgfx::setViewTransform(2, view, proj);

+ 1 - 1
examples/28-wireframe/wireframe.cpp

@@ -49,7 +49,7 @@ struct Camera
 
 
 	void mtxLookAt(float* _outViewMtx)
 	void mtxLookAt(float* _outViewMtx)
 	{
 	{
-		bx::mtxLookAt(_outViewMtx, m_pos.curr, m_target.curr);
+		bx::mtxLookAt(_outViewMtx, bx::load(m_pos.curr), bx::load(m_target.curr) );
 	}
 	}
 
 
 	void orbit(float _dx, float _dy)
 	void orbit(float _dx, float _dy)

+ 3 - 3
examples/29-debugdraw/debugdraw.cpp

@@ -627,9 +627,9 @@ public:
 			float mtxInvVp[16];
 			float mtxInvVp[16];
 			bx::mtxInverse(mtxInvVp, mtxVp);
 			bx::mtxInverse(mtxInvVp, mtxVp);
 
 
-			float zero[3] = {};
-			float eye[] = { 5.0f, 10.0f, 5.0f };
-			bx::mtxLookAt(view, eye, zero);
+			const bx::Vec3 at  = { 0.0f,  0.0f, 0.0f };
+			const bx::Vec3 eye = { 5.0f, 10.0f, 5.0f };
+			bx::mtxLookAt(view, eye, at);
 			bx::mtxProj(proj, 45.0f, float(m_width)/float(m_height), 1.0f, 15.0f, bgfx::getCaps()->homogeneousDepth);
 			bx::mtxProj(proj, 45.0f, float(m_width)/float(m_height), 1.0f, 15.0f, bgfx::getCaps()->homogeneousDepth);
 			bx::mtxMul(mtxVp, view, proj);
 			bx::mtxMul(mtxVp, view, proj);
 
 

+ 4 - 3
examples/30-picking/picking.cpp

@@ -238,13 +238,14 @@ public:
 				const float camSpeed = 0.25;
 				const float camSpeed = 0.25;
 				float cameraSpin = (float)m_cameraSpin;
 				float cameraSpin = (float)m_cameraSpin;
 				float eyeDist = 2.5f;
 				float eyeDist = 2.5f;
-				float eye[3] =
+
+				const bx::Vec3 at = { 0.0f, 0.0f, 0.0f };
+				const bx::Vec3 eye =
 				{
 				{
 					-eyeDist * bx::sin(time*cameraSpin*camSpeed),
 					-eyeDist * bx::sin(time*cameraSpin*camSpeed),
 					0.0f,
 					0.0f,
 					-eyeDist * bx::cos(time*cameraSpin*camSpeed),
 					-eyeDist * bx::cos(time*cameraSpin*camSpeed),
 				};
 				};
-				float at[3] = { 0.0f, 0.0f, 0.0f };
 
 
 				float view[16];
 				float view[16];
 				bx::mtxLookAt(view, eye, at);
 				bx::mtxLookAt(view, eye, at);
@@ -277,7 +278,7 @@ public:
 
 
 				// Look at our unprojected point
 				// Look at our unprojected point
 				float pickView[16];
 				float pickView[16];
-				bx::mtxLookAt(pickView, pickEye, pickAt);
+				bx::mtxLookAt(pickView, bx::load(pickEye), bx::load(pickAt) );
 
 
 				// Tight FOV is best for picking
 				// Tight FOV is best for picking
 				float pickProj[16];
 				float pickProj[16];

+ 1 - 1
examples/31-rsm/reflectiveshadowmap.cpp

@@ -476,7 +476,7 @@ public:
 			lightAt[1] = 0.0f;
 			lightAt[1] = 0.0f;
 			lightAt[2] = 0.0f;
 			lightAt[2] = 0.0f;
 
 
-			bx::mtxLookAt(smView, lightEye, lightAt);
+			bx::mtxLookAt(smView, bx::load(lightEye), bx::load(lightAt) );
 			const float area = 10.0f;
 			const float area = 10.0f;
 			const bgfx::Caps* caps = bgfx::getCaps();
 			const bgfx::Caps* caps = bgfx::getCaps();
 			bx::mtxOrtho(smProj, -area, area, -area, area, -100.0f, 100.0f, 0.0f, caps->homogeneousDepth);
 			bx::mtxOrtho(smProj, -area, area, -area, area, -100.0f, 100.0f, 0.0f, caps->homogeneousDepth);

+ 2 - 2
examples/33-pom/pom.cpp

@@ -225,8 +225,8 @@ public:
 
 
 			float time = (float)( (now-m_timeOffset)/freq);
 			float time = (float)( (now-m_timeOffset)/freq);
 
 
-			float at[3]  = { 0.0f, 0.0f, 1.0f };
-			float eye[3] = { 0.0f, 0.0f, 0.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f, 1.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, 0.0f };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{

+ 2 - 2
examples/34-mvs/mvs.cpp

@@ -207,8 +207,8 @@ public:
 
 
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 
 
-			float at[3]  = { 0.0f, 0.0f,   0.0f };
-			float eye[3] = { 0.0f, 0.0f, -35.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{

+ 2 - 2
examples/35-dynamic/dynamic.cpp

@@ -190,8 +190,8 @@ public:
 
 
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 			float time = (float)( (bx::getHPCounter()-m_timeOffset)/double(bx::getHPFrequency() ) );
 
 
-			float at[3]  = { 0.0f, 0.0f,   0.0f };
-			float eye[3] = { 0.0f, 0.0f, -35.0f };
+			const bx::Vec3 at  = { 0.0f, 0.0f,   0.0f };
+			const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
 
 
 			// Set view and projection matrix for view 0.
 			// Set view and projection matrix for view 0.
 			{
 			{

+ 1 - 1
examples/37-gpudrivenrendering/gpudrivenrendering.cpp

@@ -55,7 +55,7 @@ struct Camera
 
 
 	void mtxLookAt(float* _outViewMtx)
 	void mtxLookAt(float* _outViewMtx)
 	{
 	{
-		bx::mtxLookAt(_outViewMtx, m_pos.curr, m_target.curr);
+		bx::mtxLookAt(_outViewMtx, bx::load(m_pos.curr), bx::load(m_target.curr) );
 	}
 	}
 
 
 	void orbit(float _dx, float _dy)
 	void orbit(float _dx, float _dy)

+ 1 - 1
examples/common/camera.cpp

@@ -240,7 +240,7 @@ struct Camera
 
 
 	void getViewMtx(float* _viewMtx)
 	void getViewMtx(float* _viewMtx)
 	{
 	{
-		bx::mtxLookAt(_viewMtx, &m_eye.x, &m_at.x, &m_up.x);
+		bx::mtxLookAt(_viewMtx, bx::load(&m_eye.x), bx::load(&m_at.x), bx::load(&m_up.x) );
 	}
 	}
 
 
 	void setPosition(const float* _pos)
 	void setPosition(const float* _pos)