Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate WebGL1 support #34

Open
yanchith opened this issue Aug 15, 2018 · 1 comment
Open

Investigate WebGL1 support #34

yanchith opened this issue Aug 15, 2018 · 1 comment

Comments

@yanchith
Copy link
Owner

yanchith commented Aug 15, 2018

There could theoretically be support for WebGL1 with some required extensions (VAOs).

  • How would this change the API?
  • Can we support all features, or would some capabilities need to be disabled for WebGL 1 mode?
  • Can #version 300 es be supported?

This can only be considered a win when the user doesn't need to know, whether he is using WebGL 1 or 2 under the hood. Also, need for this will disappear with time.

@yanchith
Copy link
Owner Author

yanchith commented Feb 2, 2021

2021 UPDATE:

WebGL1 with OES_vertex_array_object and WEBGL_depth_texture still has more browser support than WebGL2 with the main difference being Desktop and Mobile Safari. IE does not support OES_vertex_array_object and WEBGL_depth_texture.

https://caniuse.com/?search=createVertexArrayOES
https://caniuse.com/?search=WebGL2

Since we didn't go too crazy with extensions and features, I believe the major API change would be writing shaders in older dialect of GLSL.

On top of that there would be missing features, like having much less texture formats available. We would have to detect these missing features either with runtime asserts, or somehow make all the types of Webglutenfree generic over the type of WebGL context (even if possible, this would unnecessarily complicate the API for everyone, so I don't prefer it). A list of features added to WebGL2 over WebGL can be seen here: https://webgl2fundamentals.org/webgl/lessons/webgl2-whats-new.html.

This is still within the realm of possibility, but the value decreases with time, and will disappear completely once Safari supports WebGL2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant