After fixing the raw pointer issue I asked about in another thread, a new problem has cropped up. Whenever my app tries to call a native function on the created module I get the subject error.
Here is a typical stack trace
Uncaught (in promise) TypeError: handle is undefined
I am using -sMODULARIZE and I instantiate the module with
createKtxModule({preinitializedWebGLContext: gl}).then(instance => {
window.ktx = instance;
// Make existing WebGL context current for Emscripten OpenGL.
ktx.GL.makeContextCurrent(
ktx.GL.createContext(document.getElementById("glcanvas"),
{ majorVersion: 2.0 })
);
main()
});
where createKtxModule is the export name. That call to ktx.GL.makeContextCurrent is working but I suppose that is not a native function.
Everything was working on 4.0.7.
Does anyone know how to fix this?
I am horrified by the number of breakages these supposedly minor patch releases (4.0.8 and 4.0.9) have caused in my code. I have spent 2 days on fixes so far.