Skip to content

EmscriptenGLX ​

Overview ​

Currently, the major minigame platforms mainly use webgl/webgl2 rendering contexts. For minigames converted using a JS engine, their GL instruction calls are mainly rendered through JS -> platform. However, for minigames converted using a WebAssembly approach (such as the Unity/Tuanjie Engine rapid adaptation solution), all GL instruction calls within the game need to go through three layers of conversion: WASM -> WebGL JS glue layer -> platform rendering. For games using such a conversion approach, the high-frequency communication between the WASM module and JavaScript undoubtedly brings heavy performance overhead.

To solve this problem, the Runtime uses the EmscriptenGLX integration solution. With the EmscriptenGLX rendering mode, WASM -> platform rendering can be completed entirely within WASM, eliminating the high-frequency call chain between WASM and JS.