]> git.mxchange.org Git - flightgear.git/commitdiff
Patch from Melchior Franz:
authordavid <david>
Wed, 27 Mar 2002 15:53:15 +0000 (15:53 +0000)
committerdavid <david>
Wed, 27 Mar 2002 15:53:15 +0000 (15:53 +0000)
The matrix doesn't define some cells, which are actually used
in the multiplication. That makes the result unpredictable.
I have no idea if 0.0 is the correct value for these, but
garbage is hardly the correct value either. Should some of them
be set to 1.0?

src/Main/viewer.cxx

index b5a90a470a51c85952ef2a688acf3d77fc70006f..e213a1993d479b32ea7ecaeaf676ca3634b949d7 100644 (file)
@@ -572,12 +572,19 @@ FGViewer::recalc ()
     VIEW[0][0] = right[0];
     VIEW[0][1] = right[1];
     VIEW[0][2] = right[2];
+    VIEW[0][3] = 0.0;
     VIEW[1][0] = forward[0];
     VIEW[1][1] = forward[1];
     VIEW[1][2] = forward[2];
+    VIEW[1][3] = 0.0;
     VIEW[2][0] = _view_up[0];
     VIEW[2][1] = _view_up[1];
     VIEW[2][2] = _view_up[2];
+    VIEW[2][3] = 0.0;
+    VIEW[3][0] = 0.0;
+    VIEW[3][1] = 0.0;
+    VIEW[3][2] = 0.0;
+    VIEW[3][3] = 0.0;
     // multiply the OFFSETS (for heading and pitch) into the VIEW
     sgPostMultMat4(VIEW, VIEW_OFFSET);