Differences between WebGL and OpenGL

WebGL is meant to run in a browser (web applications).

WebGL is a software library that extends the capability of the JavaScript programming language to allow it to generate interactive 3D graphics within any compatible web browser.
...
It uses the HTML5 canvas element and is accessed using Document Object Model interfaces. Automatic memory management is provided as part of the JavaScript language.


OpenGL is typically used in desktop applications. It is a cross-language, cross-platform specification, of which WebGL is more-or-less a subset.


WebGL is "OpenGL ES 2", not plain OpenGL (the ES stands for 'for Embedded Systems'). So there's the first difference. OpenGL ES is essentially a subset of OpenGL. In addition, WebGL is almost the same as OpenGL ES 2, but has some subtle differences, explained in the link you provide. There's not much to add to that link, it's a pretty clear explanation of what is different between OpenGL ES 2 and Webgl.


OpenGL is a desktopcomputer-centric API (like Direct3D). WebGL is derived from OpenGL ES 2.0 (intended for mobile devices) which has less capabilities and is simpler to use.

WebGL is also designed to run in a browser, and has therefore a few limitations more then OpenGL ES 2.0.

Unlike OpenGL, WebGL does not require native driver support. A wrapper called ANGLE, which Safari, Chrome and Firefox use can translate WebGL calls and GLSL to either OpenGL/GLSL or Direct3D/HLSL

Please see the Khronos wiki for a detailed answer: http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences

Tags:

Opengl

Webgl