Is there a plan to support WebGL2 ? (and bug provide)
MikiraSora opened this issue · 1 comments
Currently browsers and their plaform support webgl2 , but Canvas only support WebGL1 , even there is no way to use webgl extensions.
So I wanna know question that the title said.
BTW , I also fork Canvas and try to implements WebGL2Context by inhert WebGLContext. There is my fork repo
But I got "Uncaught TypeError: Illegal invocation” in runtime. I think webg2 support will be done quickly if this problem could fix
ref code
I wanted to make the WebGL2 context available and got the same issue after getting a 'webgl2' context instead of 'webgl'.
The fix for me was to use the WebGL2RenderingContext instead of WebGLRenderingContext (mind the 'WebGL2*' there) in CanvasContextManager.ts.
This also required me to install the webgl2 types (npm install --save @types/webgl2) in the JS project.
After that, I was able to use the WebGL2 context and compile ES3.0 shaders.