I am loading.obj models using the preload
EMSCRIPTEN flag so that I am able to use them in WASM/WebGL from C++/OpenGL ES, the memory consumption goes over the limit when loading a 64mb.obj, I am able to load smaller models but from that size onward I crash. What is the correct way of loading large files so that I can access them in C++? I also tried the embed
command but that doesn't work either.
For a large file, place it in the server as a static resource and use the Fetch API . You can let the browser cache it by using the EMSCRIPTEN_FETCH_PERSIST_FILE
flag. It uses the HTML5 IndexedDB designed to store large data, such as 1GB. See this question for the size limit.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.