-1

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.

programmer
  • 743
  • 4
  • 10

1 Answers1

-1

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.

jscastro
  • 3,422
  • 1
  • 9
  • 27