Browse Source

Fix possible data corruption in AssimpView (see http://sourceforge.net/projects/assimp/forums/forum/817654/topic/3831953). Thanks to mick-p to point it out.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@810 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 15 years ago
parent
commit
400086e19f
2 changed files with 1 additions and 9 deletions
  1. 0 8
      tools/assimp_view/Display.cpp
  2. 1 1
      tools/assimp_view/assimp_view.cpp

+ 0 - 8
tools/assimp_view/Display.cpp

@@ -1601,14 +1601,6 @@ int CDisplay::HandleInput()
 		D3DXVec3TransformNormal((D3DXVECTOR3*)&g_avLightDirs[0],
 			(D3DXVECTOR3*)&g_avLightDirs[0],(D3DXMATRIX*)&mMat);
 
-		// 2 lights to rotate?
-		if (g_sOptions.b3Lights)
-		{
-			D3DXVec3TransformNormal((D3DXVECTOR3*)&g_avLightDirs[1],
-				(D3DXVECTOR3*)&g_avLightDirs[1],(D3DXMATRIX*)&mMat);
-
-			g_avLightDirs[1].Normalize();
-		}
 		g_avLightDirs[0].Normalize();
 	}
 	return 1;

+ 1 - 1
tools/assimp_view/assimp_view.cpp

@@ -101,7 +101,7 @@ aiMatrix4x4 g_mWorld;
 aiMatrix4x4 g_mWorldRotate;
 aiVector3D g_vRotateSpeed			= aiVector3D(0.5f,0.5f,0.5f);
 
-// NOTE: The second light direction is no computed from the first
+// NOTE: The second light direction is now computed from the first
 aiVector3D g_avLightDirs[1] = 
 {	aiVector3D(-0.5f,0.6f,0.2f)  };