0
votes

I have a WebGLRenderingContext (XR-compatible) that is being drawn on by regular WebGL calls, and I also want to render on it using a Three.js WebGLRender. For some reason, creating a THREE.WebGLRenderer using the existing context (even if render is never called) makes the canvas go blank, and no drawing shows up after that.

1

1 Answers

0
votes

If you check HTML5 spec you’ll see you cannot share the context for 2D and webgl. A workaround could be to get a new context from a hidden canvas, that’s what some websites do.