Hi,
My app is using the Module.GL.getNewId function in order to create handles
to WebGL textures, This is done so that I'll be able to load the textures
on the JS side, and use them via OpenGL APIs in WASM. We want to start
building with MODULARIZE=1, but this hides the GL object in the Module's
closure.
I know that this can be fixed with post-js operations, but I'd like to have
a solution that is less likely to be broken by future versions of
Emscripten, so I want to open a PR that will fix this situation. I see 3
possible solutions:
1. Expose the GL object as-is on the Module.
2. Expose a wrapper to the getNewId function, and a matching function that
allows removal of said handle.
3. Add to the module a JS function that returns a pair - a WebGL texture,
and its OpenGL handle, and a matching function to remove said handle.

Are any of these ideas worth pursuing? Anything I might be missing?

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CA%2B_KjGbe69JGq073iALzK%2B9YiEfZ-6w31t7Hn0fEzNkt2j7KXQ%40mail.gmail.com.

Reply via email to