Open stepancar opened 1 year ago
Hello! gl.texImage2D supports HTMLCanvasElement
In browser it works instantly , because under the hood they avoid moving data GPU -> CPU -> GPU
In headless gl implementation we see that in order to upload canvas to webgl it reads pixels from 2d context and then uploads it webgl
https://github.com/stackgl/headless-gl/blob/f1ed92fef1688bd9e9b8206516d1083a186f7ce3/src/javascript/webgl-rendering-context.js#L3149
Is it possible to speed it up somehow using just webgl?
@ivanpopelyshev maybe you can suggest anything, thanks!
If I understand correctly, we could create shared textures using EGL and pass them between contexts
Hello! gl.texImage2D supports HTMLCanvasElement
In browser it works instantly , because under the hood they avoid moving data GPU -> CPU -> GPU
In headless gl implementation we see that in order to upload canvas to webgl it reads pixels from 2d context and then uploads it webgl
https://github.com/stackgl/headless-gl/blob/f1ed92fef1688bd9e9b8206516d1083a186f7ce3/src/javascript/webgl-rendering-context.js#L3149
Is it possible to speed it up somehow using just webgl?