Author here. SwissGL is an experiment in minimal API design. I needed something that would simplify making things like https://znah.net/hexells or https://znah.net/lenia I'm planning to switch to WebGPU once it's widely supported. I also think there's a chance for SwissGL.c, SwissGL.py and SwissGL.zig
SwissGL: Swiss Army Knife for WebGL2
11–19 of 19 posts
Re: SwissGL: Swiss Army Knife for WebGL2
#12Author here. SwissGL is an experiment in minimal API design. I needed something that would simplify making things like https://znah.net/hexells or https://znah.net/lenia I'm planning to switch to WebGPU once it's widely supported. I also think there's a chance for SwissGL.c, SwissGL.py and SwissGL.zig
The example in the README seems to be dividing “undefined” by 1000. Am I misunderstanding something, does that code truly generate the output shown somehow?
Re: SwissGL: Swiss Army Knife for WebGL2
#13Earlier quoted context omitted.
The biggest difference I spot between the two is that WebGL2 uses OpenGL ES 3 and WebGL uses OpenGL ES 2, but really other than supporting by default things that required extensions in WebGL I don't see much of an improvement. Also, it was released in Firefox in 2017 meaning it has been here for a long time already [0]. Interestingly enough projects such as Godot seem to until recently give preference to other APIs s…
It was also supposed to support GL ES compute shaders, developed by Intel, which Google refused to implement in name of WebGPU compute. So here we are without WebGPU being stable and without WebGL compute.
Re: SwissGL: Swiss Army Knife for WebGL2
#14Earlier quoted context omitted.
It was also supposed to support GL ES compute shaders, developed by Intel, which Google refused to implement in name of WebGPU compute. So here we are without WebGPU being stable and without WebGL compute.
Apple refused to implement GL compute shaders. Without that, Intel's code didn't work on macOS.
Chrome could have done it on top of Metal.
Re: SwissGL: Swiss Army Knife for WebGL2
#15Earlier quoted context omitted.
Apple refused to implement GL compute shaders. Without that, Intel's code didn't work on macOS.
It isn't as if WebGL relies on GL on Windows. Chrome could have done it on top of Metal.
Re: SwissGL: Swiss Army Knife for WebGL2
#16Earlier quoted context omitted.
It isn't as if WebGL relies on GL on Windows. Chrome could have done it on top of Metal.
Yes, Chrome could have rewritten the entire WebGL implementation to run on Metal. Maybe. Without support from Apple I'm not certain that WebGL 2 could have been fully implemented in a 100% compatible way over desktop Metal at the time. But it's not as though Google rejected a working implementation for no good reason.
"At the time" was 2021.
Politics.
Re: SwissGL: Swiss Army Knife for WebGL2
#17Earlier quoted context omitted.
Yes, Chrome could have rewritten the entire WebGL implementation to run on Metal. Maybe. Without support from Apple I'm not certain that WebGL 2 could have been fully implemented in a 100% compatible way over desktop Metal at the time. But it's not as though Google rejected a working implementation for no good reason.
And now WebGL 2.0 on Safari is actually implemented on top of Metal, with help of Chrome team. "At the time" was 2021. Politics.
Re: SwissGL: Swiss Army Knife for WebGL2
#18Earlier quoted context omitted.
And now WebGL 2.0 on Safari is actually implemented on top of Metal, with help of Chrome team. "At the time" was 2021. Politics.
"At the time" was 2019 actually. Back then it wasn't even clear if Apple would ever implement WebGL 2 at all.
-- Sep 24, 2020,
https://registry.khronos.org/webgl/specs/latest/2.0-compute/
-- Last update, regarding deprecation, 31 March 2021
Hence 2021.
Same reasoning could be applied to Microsoft and Sony Playstation browsers, where neither of them support GL.
Fact is that after all these years, WebGPU still isn't here as stable version that one can rely on, and even then it is only a MVP with an incompatible shader language.
Re: SwissGL: Swiss Army Knife for WebGL2
#19Earlier quoted context omitted.
"At the time" was 2019 actually. Back then it wasn't even clear if Apple would ever implement WebGL 2 at all.
https://bugs.chromium.org/p/chromium/issues/detail?id=113199... -- Sep 24, 2020, https://registry.khronos.org/webgl/specs/latest/2.0-compute/ -- Last update, regarding deprecation, 31 March 2021 Hence 2021. Same reasoning could be applied to Microsoft and Sony Playstation browsers, where neither of them support GL. Fact is that after all these years, WebGPU still isn't here as stable version that one can rely on, and…