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
Emscripten builds cannot create multiple windows because the code is written as if there will only be one canvas element in the document. I've looked into the code and believe these tasks needed to fix this issue:
Register callbacks that don't take an element as a parameter (i.e. emscripten_set_fullscreenchange_callback, emscripten_set_focus_callback, Emscripten_set_pointer_event_callbacks) during initialization. These callbacks should look through all of the canvases in the document and only handle the event for the focused canvas. (Emscripten: Move global event handlers #12738 )
Update Emscripten_UpdateWindowFramebuffer to store multiple canvases and update the specified canvas based on the window_id of the window. This will only fix the software renderer. (Emscripten: Allow for Multiple Windows #12575 )
Based on my experience with Emscripten and HTML5 canvases, since contexts are bound to their canvas like renderers to their window, I would find it more intuitive if one SDL window == one HTML5 canvas, and disallow (or, if possible, implement in a dedicated function) the dynamic change of which canvas is bound to a window.
Emscripten builds cannot create multiple windows because the code is written as if there will only be one canvas element in the document. I've looked into the code and believe these tasks needed to fix this issue:
Remove Emscripten hints and make them propertiesAdd create window properties to be overrides for hints(emscripten: move hints to window properties #12509 )emscripten_set_fullscreenchange_callback
,emscripten_set_focus_callback
,Emscripten_set_pointer_event_callbacks
) during initialization. These callbacks should look through all of the canvases in the document and only handle the event for the focused canvas. (Emscripten: Move global event handlers #12738 )Emscripten_UpdateWindowFramebuffer
to store multiple canvases and update the specified canvas based on thewindow_id
of the window. This will only fix the software renderer. (Emscripten: Allow for Multiple Windows #12575 )Emscripten_GLES_MakeCurrent
to updateModule['canvas']
(Emscripten: Allow for Multiple Windows #12575 )The text was updated successfully, but these errors were encountered: