mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 03:40:20 +02:00
review changes
This commit is contained in:
parent
216e9bd4cb
commit
997660d430
1 changed files with 3 additions and 8 deletions
|
@ -843,14 +843,9 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const QUrl& url) {
|
||||||
qWarning(modelformat) << "There was a problem reading glTF COLOR_0 data for model " << _url;
|
qWarning(modelformat) << "There was a problem reading glTF COLOR_0 data for model " << _url;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (accessor.type == 3) {
|
int stride = (accessor.type == GLTFAccessorType::VEC4) ? 4 : 3;
|
||||||
for (int n = 0; n < colors.size(); n = n + 4) {
|
for (int n = 0; n < colors.size() - 3; n += stride) {
|
||||||
mesh.colors.push_back(glm::vec3(colors[n], colors[n + 1], colors[n + 2]));
|
mesh.colors.push_back(glm::vec3(colors[n], colors[n + 1], colors[n + 2]));
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (int n = 0; n < colors.size(); n = n + 3) {
|
|
||||||
mesh.colors.push_back(glm::vec3(colors[n], colors[n + 1], colors[n + 2]));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (key == "TEXCOORD_0") {
|
} else if (key == "TEXCOORD_0") {
|
||||||
QVector<float> texcoords;
|
QVector<float> texcoords;
|
||||||
|
|
Loading…
Reference in a new issue