emscripten-core / emscripten-core/emscripten

renderViaOffscreenBackBuffer error

Open
#18,975 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

https://emscripten.org/docs/api_reference/html5.h.html?highlight=offscreen#c.EmscriptenWebGLContextAttributes.renderViaOffscreenBackBuffer

set attr.renderViaOffscreenBackBuffer = EM_TRUE; andvia the -s OFFSCREEN_FRAMEBUFFER Emscripten linker flag. render the context error.

the demo is in
https://github.com/yangfangfang1204/offscreen/tree/main/viaOffscreenBackBuffer/SuperRenderMT2.cpp

the compile script is in
https://github.com/yangfangfang1204/offscreen/blob/main/viaOffscreenBackBuffer/readme.txt

compile the demo in emscriptenV2.0.30,run the demo in ChromeV111 , the error occur:
SuperRenderMT2.js:6075 Uncaught TypeError: Cannot read properties of undefined (reading 'clearColor')
at _emscripten_glClearColor (SuperRenderMT2.js:6075:7)
at SuperRenderMT2.wasm:0x3625
at SuperRenderMT2.wasm:0x2fed
at SuperRenderMT2.wasm:0x3c73
at SuperRenderMT2.js:1483:20
at worker.onmessage (SuperRenderMT2.js:1822:5)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.