mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 10:39:54 +02:00
fix issues with glb urls
This commit is contained in:
parent
079c0c022e
commit
ade6bf24bb
1 changed files with 3 additions and 3 deletions
|
@ -437,7 +437,7 @@ bool GLTFSerializer::addBuffer(const QJsonObject& object) {
|
||||||
|
|
||||||
getIntVal(object, "byteLength", buffer.byteLength, buffer.defined);
|
getIntVal(object, "byteLength", buffer.byteLength, buffer.defined);
|
||||||
|
|
||||||
if (_url.toString().endsWith("glb")) {
|
if (_url.path().endsWith("glb")) {
|
||||||
if (!_glbBinary.isEmpty()) {
|
if (!_glbBinary.isEmpty()) {
|
||||||
buffer.blob = _glbBinary;
|
buffer.blob = _glbBinary;
|
||||||
} else {
|
} else {
|
||||||
|
@ -677,7 +677,7 @@ bool GLTFSerializer::parseGLTF(const hifi::ByteArray& data) {
|
||||||
|
|
||||||
hifi::ByteArray jsonChunk = data;
|
hifi::ByteArray jsonChunk = data;
|
||||||
|
|
||||||
if (_url.toString().endsWith("glb") && data.indexOf("glTF") == 0 && data.contains("JSON")) {
|
if (_url.path().endsWith("glb") && data.indexOf("glTF") == 0 && data.contains("JSON")) {
|
||||||
jsonChunk = setGLBChunks(data);
|
jsonChunk = setGLBChunks(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1686,7 +1686,7 @@ HFMTexture GLTFSerializer::getHFMTexture(const GLTFTexture& texture) {
|
||||||
fbxtex.name = fname;
|
fbxtex.name = fname;
|
||||||
fbxtex.filename = textureUrl.toEncoded();
|
fbxtex.filename = textureUrl.toEncoded();
|
||||||
|
|
||||||
if (_url.toString().endsWith("glb") && !_glbBinary.isEmpty()) {
|
if (_url.path().endsWith("glb") && !_glbBinary.isEmpty()) {
|
||||||
int bufferView = _file.images[texture.source].bufferView;
|
int bufferView = _file.images[texture.source].bufferView;
|
||||||
|
|
||||||
GLTFBufferView& imagesBufferview = _file.bufferviews[bufferView];
|
GLTFBufferView& imagesBufferview = _file.bufferviews[bufferView];
|
||||||
|
|
Loading…
Reference in a new issue