"missing function: emscripten_glPolygonMode" since version 1.38.16

194 views
Skip to first unread message

Alban

unread,
Nov 12, 2018, 6:00:02 AM11/12/18
to emscripten-discuss
Hello,

I have tried porting the C++ code I work on to the latest version of emscripten (1.38.18). This code relies on the bgfx library as a wrapper around OpenGL. When bgfx gets initalized, th program aborts with "missing function: emscripten_glPolygonMode". Emscripten 1.38.15 worked fine for this specific point.

This seems to have been introduced with the auto-generation of emscripten_GetProcAddress. Before this change, requesting "glPolygonMode" returned 0, now it returns a pointer to emscripten_glPolygonMode, which appears undefined.

I can work around the issue by commenting out "if (!strcmp(name, "glPolygonMode")) return emscripten_glPolygonMode;", but I believe there is an issue here, and possibly with other gl functions.

Alban

Alon Zakai

unread,
Nov 14, 2018, 4:09:27 PM11/14/18
to emscripte...@googlegroups.com
Thanks for reporting this issue!

I think what's going on is that glPolygonMode should only be present when LEGACY_GL_EMULATION is on, and our GetProcAddress code is not aware of that, so it returned a function, but without emulation, the function was not linked in and is in practice undefined. I opened


which should fix this issue.

Please verify it fixes your codebase - would also be great if you can review the code there to see I sorted the GL functions right.

--
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-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alban

unread,
Nov 16, 2018, 5:45:16 AM11/16/18
to emscripten-discuss
Hi Alon,

I'll make a test when I have a little more time, probably next week. Thanks a lot!

Alban
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

Alban Rochel

unread,
Nov 22, 2018, 10:29:03 AM11/22/18
to emscripte...@googlegroups.com
Hi Alon,

I have just made a quick test using the changes from the legacy-getprocaddr branch, and this fix solves my issues. Unfortunately, I am not fluent enough in GL to be able to assess if your sorting is relevant :-/

Many thanks!

Alban

To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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-disc...@googlegroups.com.

Alon Zakai

unread,
Dec 3, 2018, 6:25:58 PM12/3/18
to emscripte...@googlegroups.com
Ok, thanks for confirming it fixes things. I'll try to land it later this week after more testing.
Reply all
Reply to author
Forward
0 new messages