projects
/
platform
/
upstream
/
assimp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e89e982
)
work around for indices array in ExportData
author
Angelo Scandaliato
<angelo@adtile.me>
Wed, 28 Sep 2016 22:56:06 +0000
(15:56 -0700)
committer
Angelo Scandaliato
<angelo@adtile.me>
Wed, 28 Sep 2016 22:56:06 +0000
(15:56 -0700)
code/glTFExporter.cpp
patch
|
blob
|
history
diff --git
a/code/glTFExporter.cpp
b/code/glTFExporter.cpp
index
2da709c
..
6bff387
100644
(file)
--- a/
code/glTFExporter.cpp
+++ b/
code/glTFExporter.cpp
@@
-207,7
+207,12
@@
inline Ref<Accessor> ExportData(Asset& a, std::string& meshName, Ref<Buffer>& bu
for (int i = 0 ; i < count ; i++) {
for (int j = 0 ; j < numCompsOut ; j++) {
- valueTmp = static_cast<aiVector3D*>(data)[i][j];
+ if (numCompsOut == 1) {
+ valueTmp = static_cast<unsigned short*>(data)[i];
+ } else {
+ valueTmp = static_cast<aiVector3D*>(data)[i][j];
+ }
+
if (valueTmp < acc->min[j]) {
acc->min[j] = valueTmp;
}