Skip to content

Emscripten 5#8510

Open
danoli3 wants to merge 2 commits intoopenframeworks:masterfrom
danoli3:emscripten_5
Open

Emscripten 5#8510
danoli3 wants to merge 2 commits intoopenframeworks:masterfrom
danoli3:emscripten_5

Conversation

@danoli3
Copy link
Copy Markdown
Member

@danoli3 danoli3 commented Apr 6, 2026

Emscripten 5

  • Updates Emscripten 4.0.4 -> Emscripten 5.0.5
  • added cmakelist.txt for testing
  • fixed makefile for webgpu (not used in our code)

Problems

  • Emscripten ES2 spec is using ES3 with some issues around face winding and meshes. This was noted in 4.0.4 however with more testing this is now more of a problem - Solution support ES3 properly and merge ES3 support via android PR and make amendments.

danoli3 added 2 commits April 5, 2026 10:36
- emmake.sh in template
- CMakeList.txt for emscripten
@danoli3
Copy link
Copy Markdown
Member Author

danoli3 commented Apr 6, 2026

Problems:

3D Face Winding issues.

Screenshot 2026-04-05 at 1 48 40 pm Also occurring on Font Faces Screenshot 2026-04-05 at 12 51 22 pm

Isolated issue to:
PLATFORM_LDFLAGS += -s MAX_WEBGL_VERSION=2 -s WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION=1 -s FULL_ES2

So where WebGL version == 2. ES3 is supported so we are missing critical ES3 commands for Faces

With WebGL == 1
PLATFORM_LDFLAGS += -s MAX_WEBGL_VERSION=1 -s MIN_WEBGL_VERSION=1 -s FULL_ES2=1

Now exposes the missing ES3 commands being used in engine without guards.

error: undefined symbol: glBeginTransformFeedback (referenced by root reference (e.g. compiled C/C++ code))
warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
warning: _glBeginTransformFeedback may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library

error: undefined symbol: glBindBufferBase (referenced by root reference (e.g. compiled C/C++ code))
warning: _glBindBufferBase may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
adding glBindBufferBase (referenced by root reference (e.g. compiled C/C++ code))


rror: undefined symbol: glBindBufferRange (referenced by root reference (e.g. compiled C/C++ code))
warning: _glBindBufferRange may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
adding glBindBufferRange (referenced by root reference (e.g. compiled C/C++ code))


error: undefined symbol: glEndTransformFeedback (referenced by root reference (e.g. compiled C/C++ code))
warning: _glEndTransformFeedback may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
adding glEndTransformFeedback (referenced by root reference (e.g. compiled C/C++ code))

Proper solution merge and support ES3 and use DEFINES for ES3 support
danoli3#4

I'll look at patching this in now 10 years later XD

@danoli3
Copy link
Copy Markdown
Member Author

danoli3 commented Apr 7, 2026

Yeah looking more into the ES3 support and looking at the TARGET_EMSCRIPTEN defines I can see how this was broken for meshes.

Shall apply fix.

Also https://www.pongasoft.com/blog/yan/webassembly/2024/09/12/Introducing-emscripten-glfw
We should apply the emscripten glfw with multi window support for the windowing system

@danoli3
Copy link
Copy Markdown
Member Author

danoli3 commented Apr 7, 2026

@danoli3
Copy link
Copy Markdown
Member Author

danoli3 commented Apr 7, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant