Open alijaya opened 6 years ago
Hi. Yes. It will take time and work.
In case some one want's to take this one, by default should run WebGL 1.0 to keep legacy compatibility to the BookOfShader and glslViewer.
We can implement it using flags when is add as a HTML component. Ex:
<canvas class="glslCanvas" data-fragment-url="shader.frag" width="500" height="500" data-webg="2"></canvas>
and when is use as a JS class, something like:
'var sandbox = new GlslCanvas(canvas, { webgl_version : 2 });'
I'm not really sure whether webgl 2 is backward-compatible with webgl 1. If it's yes, I think we can make it as the default if the browser supports the webgl 2, and will go webgl 1 if the browser doesn't support.
I believe they are different versions of GLSL. WebGL 1.0 use the same of OpenGL ES 2.0 and WebGL 2.0 of OpenGL ES 3.0
Sent from my iPhone
On Apr 26, 2018, at 5:36 PM, Ali Jaya Meilio notifications@github.com wrote:
I'm not really sure whether webgl 2 is backward-compatible with webgl 1. If it's yes, I think we can make it as the default if the browser supports the webgl 2, and will go webgl 1 if the browser doesn't support.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I'm very interested in this feature. Any chance of merging this PR soon? I'd be glad to help if I can.
Still not supporting WebGL 2.0 I needed to use mat4x2 and cannot because glslCanvas still on WebGL 1.0 =(
For anyone interested in this, take a look at issue #71 that I posted.
Is there any possibility to use WebGL 2.0?