4 ms·
> I just tried a WebGL demo, and got wildly different results depending on the browser That's not a problem with the API, that's a problem with one or more of
by rewq4321 6y ago
> I just tried a WebGL demo, and got wildly different results depending on the browser
That's not a problem with the API, that's a problem with one or more of your browsers.
Bench-marking your code during init to choose the best algorithm is a very sane thing to do if you know your users' machines/browsers may have different capabilities. We're talking about extra fractions of a second of load time. The alternative is to expose a bunch of details about what's underneath the browser, which would probably not fit with the goals of the web - it being a sort of abstraction layer over all the operating systems and devices.
- jlokier 6y agoI agree when it comes to benchmarking for speed in WebGL. It's much more of a pain when calculations come out wrong though. It's hard to anticipate all the ways that might happen, check for them, and then find workarounds when you don't have the hardware where they go wrong. As noted in this comment https://news.ycombinator.com/item?id=24026914 https://news.ycombinator.com/item?id=24026914 some of these problems appear to be browser-independent. Bad calculations can ruin a game, not just due to visual glitches, but by revealing things that should be hidden, for example seeing through holes in walls caused by glitches.