2 ms·
SDL also does other weird things (or at least did), like rendering each 2D sprite in its own draw call. The way to handle something like setting unique pixels
by flohofwoe 6y ago
SDL also does other weird things (or at least did), like rendering each 2D sprite in its own draw call.
The way to handle something like setting unique pixels is to keep a pixel buffer in memory on the WASM side, set the pixels in there, and then once per frame copy this pixel buffer into a WebGL texture and render this through a single WebGL draw call, or blit the pixel buffer to a 2D canvas if WebGL is not an option (also once per frame).
- Rochus 6y agoUnfortunately with WASM we don't have so many other ways to migrate a desktop GUI application at the moment. If I have to redesign the whole existing GUI application to run on WASM, the technology is not really attractive.