Search code examples
javascriptwebglwebgl2

Are there any major differences between webgl and webgl2 APIs?


I'm currently learning WebGL and I found out that there are actually 2 variants of this api -> webgl and webgl2. So I would say that webgl2 is a newer version of the api, therefore it would be better to start with it. But I'm a bit confused now since most of the tutorials and documentations I've seen still uses webgl.

According to what I found there is not so much difference between them and that webgl2 has less support among browsers.

So I would be glad if someone could briefly explain to me if there is any big difference between them and if it would be a problem to switch from one to the other.


Solution

  • WebGL2 is backwards compatible with WebGL1, it builds upon it, most notably adding support for more texture formats and providing a bunch of functionality that was previously only available via extensions in WebGL1.