From 23172c9aecd1fac96e8b0df7e15341f3a6603191 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Wed, 23 Mar 2016 01:05:02 +0000 Subject: [PATCH] fix for bad matrix with NaN --- Src/Graphics/New3D/R3DShader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/Graphics/New3D/R3DShader.cpp b/Src/Graphics/New3D/R3DShader.cpp index 57d6324..a05a0f6 100644 --- a/Src/Graphics/New3D/R3DShader.cpp +++ b/Src/Graphics/New3D/R3DShader.cpp @@ -279,6 +279,8 @@ void R3DShader::SetModelStates(const Model* model) MatDet test; //========== + test = MatDet::notset; // happens for bad matrices with NaN + if (model->determinant < 0) { test = MatDet::negative; } else if (model->determinant > 0) { test = MatDet::positive; } else if (model->determinant == 0) { test = MatDet::zero; }