Hi all,
this is a question about CanvasKit.
Using the CanvasKit API, it is possible to create a Skia Surface for rendering to a WebGL Texture?
We want to use a layer-based drawing concept, where individual WebGL textures will compose the final image. Some layers are 3D (we render on them directly using WebGL), some will be 2D and we would like to use CanvasKit to render on those.
The Layer Manager already exists, it cares for allocating and managing the required WebGL textures as well as the correct order of blitting the textures together.
What is missing, is to hand over one (or more) of the WebGL Textures/Layers to CanvasKit and make them accessible for rendering using CanvasKit.
I found the following Surface creators, which all seem not to match our scenario:
CanvasKit.MakeSWCanvasSurface --- CPU, not GPU
CanvasKit.MakeOnScreenGLSurface, --- OnScreen, not a texture
CanvasKit.MakeGPUCanvasSurface, --- we're using WebGL, not WebGPU
CanvasKit.MakeGPUTextureSurface.
--- we're using WebGL, not WebGPU
Any help or idea greatly appreciated;
Michael.