3 ms·
Unless you queue up primitives for batch rendering, there is no chance that the canvas API is even remotely as fast as proper WebGL usage due to its design. You
by gmueckl 7y ago
Unless you queue up primitives for batch rendering, there is no chance that the canvas API is even remotely as fast as proper WebGL usage due to its design. You need to create a vertex buffer (at least somewhere under hood) and submit it in a single operation (at least under the hood) to get this kind of performance. Looping over lines on the CPU with immediate submission doesn't get you anywhere close.
- londons_explore 7y agoNo browser does immediate submission of canvas draw calls. They all appear synchronous, but the reality is they are all queued until the end of a browser main frame, or until your code does something silly like reading back a pixel.