What do the exception messages say? Also are you seeing any suspicious 
messages about missing functions in the build process? E.g. if any GL 
functions are not implemented by the Emscripten WebGL wrapper it would most 
likely already show up as warnings during the linker stage.

Another (more likely) reason is that the code which worked fine on "desktop 
GL" has problems with WebGL's much stricter specification and validation, 
in that case the error messages in the JS console usually provide a hint 
about what's going wrong.

The only advice I can give regarding debugging is to compile with -g so 
that Emscripten doesn't do any minification or name mangling, that way the 
callstack in the exception messages is readable (functions have their 
expected names instead of being minified). IME usually that's enough to 
figure out what's going wrong.

Cheers,
-Floh.

On Monday, 13 December 2021 at 07:53:59 UTC+1 [email protected] 
wrote:

> I've made some first steps in Emscripten via the tutorials, and have now 
> begun to retarget a working program to the browser.
>
> The candidate program compiles without errors via CMake without any 
> special linker directive to limit the GL calls (LEGACY_GL_EMULATION, 
> MAX_WEBGL_VERSION=2) 
> with:
>
> *emcmake cmake -DPLATFORM=Web*
> *emmake make*
>
> At runtime in a local python server I see uncaught exceptions. How might I 
> tell if those errors are due to limitations in Emscripen WebGL support?
>
> A more general question: how best to debug these exceptions in the browser?
>

-- 
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/12913559-9cf8-4a02-ad4e-53e2076ba392n%40googlegroups.com.

Reply via email to