Skip to content

Fix Emscripten#2005

Merged
dimensionscape merged 5 commits into
openfl:developfrom
barisyild:fix-wasm-build
May 9, 2026
Merged

Fix Emscripten#2005
dimensionscape merged 5 commits into
openfl:developfrom
barisyild:fix-wasm-build

Conversation

@barisyild
Copy link
Copy Markdown
Contributor

@barisyild barisyild commented Dec 8, 2025

Fix Emscripten compile & rendering issues, implement HTTP requests, remove assets from virtual file system and remove curl and efsw to reduce file size

Emscripten Status

  • Rendering
    • Rendering [X] -> [✓]
    • Auto Size Canvas [X] -> [✓]
  • Network
    • HTTP Request [X] -> [✓]
  • Compile
    • Compile [X] -> [✓]
    • Optimizations [X] -> [✓]
  • File Size Optimizations
    • Removing curl and efsw from Build [X] -> [✓]

…emove assets from virtual file system and remove curl and efsw to reduce file size
Comment thread project/src/ExternalInterface.cpp Outdated
@barisyild
Copy link
Copy Markdown
Contributor Author

Only rendering issues remain:

  • Some areas are not being rendered
  • Some areas are rendered with incorrect colors

@barisyild
Copy link
Copy Markdown
Contributor Author

Only rendering issues remain:

  • Some areas are not being rendered
  • Some areas are rendered with incorrect colors

Even though the project is using WebGL2 (OpenGL 3), this might be happening because the API being used is actually WebGL (OpenGL 2). I’m not very familiar with the behavioral differences between these two versions.

#elif defined (EMSCRIPTEN)
#define LIME_GLES
// #define LIME_GLES3_API
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>

@barisyild
Copy link
Copy Markdown
Contributor Author

barisyild commented May 9, 2026

Rendering fixed, waiting for merging.

Requires openfl/openfl#2860 on OpenFL

@barisyild barisyild mentioned this pull request May 9, 2026
@dimensionscape dimensionscape merged commit 5c508dc into openfl:develop May 9, 2026
32 checks passed
@player-03 player-03 mentioned this pull request May 14, 2026
{
System.mkdir(Path.directory(path));
AssetHelper.copyAsset(asset, path, context);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does WASM really need two copies of the non-template assets? You've got this here, and above on line 472 it also copies it into obj/assets.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about that because it's been a while since I wrote the code; need to test it.

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.

3 participants