From f2e6f2f67f04a8c28bc9d025321ae8ac1460995c Mon Sep 17 00:00:00 2001 From: Angelo Scandaliato Date: Wed, 28 Sep 2016 15:56:06 -0700 Subject: [PATCH] work around for indices array in ExportData --- code/glTFExporter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp index 2da709c..6bff387 100644 --- a/code/glTFExporter.cpp +++ b/code/glTFExporter.cpp @@ -207,7 +207,12 @@ inline Ref ExportData(Asset& a, std::string& meshName, Ref& bu for (int i = 0 ; i < count ; i++) { for (int j = 0 ; j < numCompsOut ; j++) { - valueTmp = static_cast(data)[i][j]; + if (numCompsOut == 1) { + valueTmp = static_cast(data)[i]; + } else { + valueTmp = static_cast(data)[i][j]; + } + if (valueTmp < acc->min[j]) { acc->min[j] = valueTmp; } -- 2.7.4