You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have pthread with offscreen canvas and use the commit function, however, all I get is a black screen.
Using emscripten_set_main_loop instead works well.
The emscripten_webgl_commit_frame returns 0 (success).
I also tried adding emscripten_current_thread_process_queued_calls into the loop in case there were any events that would need processing.
I am testing this with chrome Version 79.0.3945.130 (Official Build) (64-bit) on ubuntu.
(I cannot test with firefox because it no longer works with shared array buffers even when enabled.)
Built with sdk-releases-upstream-967836071d96d9b7894e492382f5fcb96423fc07-64bit.
Unfortunately the latest draft of OffscreenCanvas no longer supports explicit swapping behavior. It is not clear if the final spec will, but currently it looks like it will not.
If so, explicit swapping will be restricted to the OFFSCREEN_FRAMEBUFFER feature - and in OFFSCREEN_CANVAS, to swap one will need to yield back to browser event loop.
I have pthread with offscreen canvas and use the commit function, however, all I get is a black screen.
Using emscripten_set_main_loop instead works well.
Source code of the rendering part: https://github.com/melowntech/vts-browser-cpp/blob/9110c3d4fd4cf18dcccfa1358ae4005f73a5b84c/browser/src/vts-browser-wasm-canvas/render.cpp
Defining the RENDER_EXPLICIT_SWAP enables the commit function within an infinite loop. Am I using this correctly?
The emscripten_webgl_commit_frame returns 0 (success).
I also tried adding emscripten_current_thread_process_queued_calls into the loop in case there were any events that would need processing.
I am testing this with chrome Version 79.0.3945.130 (Official Build) (64-bit) on ubuntu.
(I cannot test with firefox because it no longer works with shared array buffers even when enabled.)
Built with sdk-releases-upstream-967836071d96d9b7894e492382f5fcb96423fc07-64bit.
Relevant build flags:
-s OFFSCREENCANVAS_SUPPORT=1 -s PROXY_TO_PTHREAD=1 -s OFFSCREENCANVASES_TO_PTHREAD='#display' -s WASM=1 -s USE_PTHREADS=1 -s USE_WEBGL2=1 -s FULL_ES3=1
Thanks for any help.
The text was updated successfully, but these errors were encountered: