Live data from Hacker News

OpenGL to WASM, learning from my mistakes

uds5501.github.io

21–28 of 28 posts

Re: OpenGL to WASM, learning from my mistakes

#22

Earlier quoted context omitted.

Not only that, but the "lessons" learned here don't seem to have anything to do with the specific fact its an emscripten port anyway, just like general webgl troubleshooting. To be fair, its very explicit that this isn't really a typical writeup. The whole article is apparently just about giving you answers that the AI didn't give them: > I believe anyone can learn this tech with the presence of resource and LLMs, ho…

As soon as I read that line I stopped reading, I really don't care what mistakes an AI made - it doesn't understand what it's doing so the mistakes are arbitrary, and relate more to it's inability to understand anything than some fundamental difficulty in the topic. Just look at the mistakes in the article: an off-by-one error with the lines of code for rendering, and a pointer bug that prevents the program from comp…

Your last off-by-one bug was in your first few weeks of programming?

Re: OpenGL to WASM, learning from my mistakes

#23
post #7

This is a very confusing article that doesn’t make much sense to me. The authors runs into performance limits on their laptop and states > maybe it’s time to port this to the web and not my machine be a blocker for the demo. So their solution is to port from C++ and OpenGL to WASM and WebGL. Last I checked WASM and WebGL all ran on the local machine, how on earth would porting to WebGL and WASM allow the author to ma…

WebGL runs on the same machine but uses a very different path to the GPU. On Mac, OpenGL is deprecated and the implementation is very outdated and feature poor. WebGL is not deprecated, and uses the ANGLE library to run on top of Metal.

> WebGL is not deprecated, and uses the ANGLE library

*on Chromium!!!

Firefox and WebKit do not use ANGLE for rendering.

Re: OpenGL to WASM, learning from my mistakes

#25
post #7

Earlier quoted context omitted.

WebGL runs on the same machine but uses a very different path to the GPU. On Mac, OpenGL is deprecated and the implementation is very outdated and feature poor. WebGL is not deprecated, and uses the ANGLE library to run on top of Metal.

> WebGL is not deprecated, and uses the ANGLE library *on Chromium!!! Firefox and WebKit do not use ANGLE for rendering.

This is false. Source: I added WebGL 2 support to WebKit using ANGLE, with Apple's help (they made ANGLE's Metal backend). Firefox uses ANGLE on every platform for shader translation, and on some platforms it uses ANGLE for the entire API (on others it has a custom OpenGL to WebGL translation layer).

Re: OpenGL to WASM, learning from my mistakes

#26

Earlier quoted context omitted.

> WebGL is not deprecated, and uses the ANGLE library *on Chromium!!! Firefox and WebKit do not use ANGLE for rendering.

This is false. Source: I added WebGL 2 support to WebKit using ANGLE, with Apple's help (they made ANGLE's Metal backend). Firefox uses ANGLE on every platform for shader translation, and on some platforms it uses ANGLE for the entire API (on others it has a custom OpenGL to WebGL translation layer).

Do they use it for the window surfaces? AFAIK Chromium is the only one that does that.

Re: OpenGL to WASM, learning from my mistakes

#27

Earlier quoted context omitted.

This is false. Source: I added WebGL 2 support to WebKit using ANGLE, with Apple's help (they made ANGLE's Metal backend). Firefox uses ANGLE on every platform for shader translation, and on some platforms it uses ANGLE for the entire API (on others it has a custom OpenGL to WebGL translation layer).

Do they use it for the window surfaces? AFAIK Chromium is the only one that does that.

I don't think Chromium renders non-WebGL content with ANGLE.

Re: OpenGL to WASM, learning from my mistakes

#28

Earlier quoted context omitted.

Do they use it for the window surfaces? AFAIK Chromium is the only one that does that.

I don't think Chromium renders non-WebGL content with ANGLE.

Sure it does. The "ANGLE backend" flag affects everything from frame pacing to whether DRM-protected content can be screenshotted. On websites that don't touch WebGL at all whatsoever.
Post reply on HN