12 ms·
What's more, when your data is in a TypedArray, you can upload the whole thing to a texture with a single call to WebGLRenderingContext#texImage2D.
by tantalor 11y ago
What's more, when your data is in a TypedArray, you can upload the whole thing to a texture with a single call to WebGLRenderingContext#texImage2D.
- mxfh 11y agoCanvas supports a similiar method: getImageData returns a Uint8ClampedArray, putImageData stores it back into the context. https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/...