Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Draco for glTF does not work in IE11 #596

Closed
bghgary opened this issue Apr 6, 2020 · 5 comments
Closed

Latest Draco for glTF does not work in IE11 #596

bghgary opened this issue Apr 6, 2020 · 5 comments

Comments

@bghgary
Copy link

bghgary commented Apr 6, 2020

It seems like the latest fallback version https://github.com/google/draco/blob/1.3.6/javascript/draco_decoder_gltf.js does not work with IE11.

I couldn't tell if this file was built with IE_COMPATIBLE or not. Is it supposed to be?

I tried building this myself to make sure IE_COMPATIBLE is on, but it still doesn't work. I ran the following CMake command:

cmake ../ -DCMAKE_TOOLCHAIN_FILE=<path>/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DIE_COMPATIBLE=ON -DBUILD_FOR_GLTF=ON

I'm using the latest emsdk version 1.39.11. The issue seems to be that the latest emscripten generates code that uses Promises, but they are not available in IE. Supposedly, this PR puts a polyfill for Promises, but I don't see it in the resulting js.

Am I missing something?

@tomfinegan
Copy link
Contributor

Afaik the repo version of draco_decoder_gltf.js has never been built with -DIE_COMPATIBLE=1.

Can you confirm that -s LEGACY_VM_SUPPORT=1 is present in build commands with your run? Run make VERBOSE=1 to see the output. If it is and the javascript is not working with IE11 it may be an emscripten issue. The draco side has never done anything more than set that flag to enable compatibility.

@bghgary
Copy link
Author

bghgary commented Apr 6, 2020

Can you confirm that -s LEGACY_VM_SUPPORT=1 is present in build commands with your run?

Yes, it seems to be present.

-DDRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED -DDRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED @CMakeFiles/draco_encoder.dir/includes_CXX.rsp -s LEGACY_VM_SUPPORT=1 -s WASM=0 -s PRECISE_F32=1 -s EXPORTED_RUNTIME_METHODS=[] -s NO_FILESYSTEM=1 -s MODULARIZE=1 -fno-omit-frame-pointer --memory-init-file 0 -Wno-almost-asm -s ALLOW_MEMORY_GROWTH=1  -DNDEBUG -O2   -std=gnu++11

I also suspect this is a emscripten issue, but I wanted to make sure I'm not doing something wrong first.

@bghgary
Copy link
Author

bghgary commented Apr 6, 2020

I must have did something wrong before because now I have the polyfill in the generated output. Weird. Sorry for the spam.

@bghgary bghgary closed this as completed Apr 6, 2020
@bghgary
Copy link
Author

bghgary commented Apr 6, 2020

Would you consider adding IE_COMPATIBLE=1 for the precompiled fallback draco_decoder_gltf.js? It's not as useful without it. As far as I can tell, it doesn't make the js much bigger.

Plus, now that you want people to get the bits from https://www.gstatic.com/draco/v1/decoders/, it would be good if the official bits worked everywhere.

@MiiBond
Copy link

MiiBond commented Apr 20, 2020

I agree with @bghgary. We need IE support as well so it would be great if the statically-hosted JS decoder worked on IE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants