![]() Below is the same rotating cube in three.js. It is very popular, and is used by professionals and amateurs. It is a JavaScript library that greatly simplifies the WebGL API, while not being invasive or restrictive. Below is an example of how much code is needed for making a rotating cube in pure WebGL. And OpenGL is old, cumbersome and extremely low level. It turns out, even though JavaScript in the browser is much easier than C, the OpenGL API itself is not simplified for WebGL. But technically, WebGL is actually OpenGL ES, which is a subset of OpenGL meant for mobile devices. The performance on mobile devices is of course substantially lower than desktop. Unfortunately, not all mobile browsers are supported, but it should run on Chrome and Firefox on Android, Internet Explorer on Windows Mobile and the new Safari in iOS 8. There is support in Opera, but it is turned off by default. WebGL hasn’t been around for a very long time, but it is supported by the newest versions of Internet Explorer, Chrome, Firefox and Safari. The rendering executes on the graphical processing unit (GPU), which means the runtime performance is very good. This is a stark contrast to the native, compiled C/C++ of OpenGL. ![]() WebGL is basically the same as OpenGL, but it runs in your web browser and you use JavaScript to program it. OpenGL is widely used today for making games and visualization software. WebGL is the web version of OpenGL, which is one of the most popular APIs for making 3D (and 2D) stuff on your computer. Also see part 2 of this blog post What is WebGL?
0 Comments
Leave a Reply. |