3 ms·
Thanks for the hint! Do you happen to be familiar with ANGLE? What happens if I just expose GLES 3.0 bindings as WebGL2 based on the native drivers on each pla
by joaodasilvaz 5y ago
Thanks for the hint!
Do you happen to be familiar with ANGLE? What happens if I just expose GLES 3.0 bindings as WebGL2 based on the native drivers on each platform?
(my earlier understanding was that ANGLE was a WebGL-to-Direct3D translation layer, for compat on Windows.)
- modeless 5y agoMost desktop platforms unfortunately don't provide a native GLES driver, so you'd have to translate desktop GL to GLES. This is harder than it sounds, if you care about getting everything right. ANGLE handles that for you. Additionally it contains dozens of workarounds for serious driver issues on various platforms. And implementations of WebGL extensions that differ from GL/GLES extensions. In addition to all that, it does let you use DirectX on Windows instead of GL (and Metal on Mac and Vulkan wherever). The reason you want that is that many Windows PCs do not have a GL driver installed. Microsoft does not ship one, so if the OEM didn't install one and the user didn't install one then it simply doesn't exist. And even when the GL driver is installed, it is often buggier than the DirectX driver. Similarly on Mac, GL is buggier than Metal (and officially deprecated).
- klabb3 5y agoThis is very useful info for everyone aspiring to do cross platform graphics, thanks a ton!
- modeless 5y agoFor new development in native cross platform graphics I would recommend Dawn or wgpu-native as a base instead of GL. That will get you excellent portability with a modern style of API.
- mikepavone 5y ago> Most desktop platforms unfortunately don't provide a native GLES driver, so you'd have to translate desktop GL to GLES. This is somewhat less true than it used to be since one of the required features of OpenGL 4.3 is GLES 3.0 compatibility. Unfortunately, Mac OS is stuck on GL 4.1 forever (at least until they drop support completely anyway) and the other points you bring up are quite valid.