I use the gl* functions directly. Could give more details about the function pointer thing? We rely on a signal class that collects callbacks as std::function objects. I'm guessing std::function stores function pointers internally (among other things). Does it mean that dereferencing and calling a function pointer implies an invoke_* call?
On Tue, Aug 19, 2014 at 10:54 AM, Jukka Jylänki <juj...@gmail.com> wrote: > Do you perhaps call to GL via custom manually obtained function pointers? > (i.e. eglGetProcAddress or similar) If so, that will exactly amount to a > invoke_xx() statement, since that will cause an asm.js code call to > non-asm.js code via a function pointer. In Emscripten, all GL functions are > available by static linking at compilation time - even all functions for > all WebGL extensions. For best performance, the xxxGetProcAddress route > should be avoided. > > > 2014-08-19 9:36 GMT+03:00 Jean-Marc Le Roux <jeanmarc.ler...@aerys.in>: > >> So I tried removing a try/catch block and it definitely removed one of >> those 2 heavy invoke_* stacks. >> The one that finally calls to webgl is still here. >> >> I've tried commenting my OpenGL calls. The obvious result is the >> corresponding calls to WebGL disapears. >> But the (huge) invoke_* stack that was on top of it remains (except >> without the WebGL call at the bottom of it of course). >> So that's definitely not about how I call OpenGL or the WebGL bindings. >> >> Now what I've tried is to run the native app and add a breakpoint in the >> function that was calling OpenGL. >> That should be the "bottom" of that massive invoke_* stack. >> Was I've found is that I have a single try/catch block very high in the >> callstack in the method that execute our "complete" signal for asset >> loading. >> >> So as far as I understand: a try/catch will make any inclusive function >> call to be wrapped in an invoke_* method to handle potential exceptions. >> Whether an active exceptions exists/is thrown does not matter. >> Correct? >> >> -- >> 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 emscripten-discuss+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "emscripten-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/emscripten-discuss/HH86_XDgLj4/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > emscripten-discuss+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- *Jean-Marc Le Roux* Founder and CEO of Aerys (http://aerys.in) Blog: http://blogs.aerys.in/jeanmarc-leroux Cell: (+33)6 20 56 45 78 Phone: (+33)9 72 40 17 58 -- 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 emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.