10
\$\begingroup\$

I've started using WebGL and am pleased with how easy it is to leverage my OpenGL (and by extension OpenGL ES) experience. However, my understanding is as follows:

  • OpenGL ES is a subset of OpenGL
  • WebGL is a subset of OpenGL ES

Is this correct for both cases? If so, are there resources for detailing which features are missing?

For example, one notable missing feature is glPushMatrix and glPopMatrix. I don't see those in WebGL, but in my searches I cannot find them referenced in OpenGL ES material either.

\$\endgroup\$
9
\$\begingroup\$

The WebGL wiki contained a section in its FAQ hierarchy for "WebGL and OpenGL Differences" which seems to focus on differences in WebGL from "desktop" OpenGL implementations and, alas, isn't very detailed (mostly it's about behavior, not the API).

If that does not go into enough detail for you, you may need to compare the latest WebGL draft with the OpenGL ES or OpenGL specifications manually.

\$\endgroup\$
9
\$\begingroup\$

Have you checked the latestp WebGL draft?

According to the draft in case of a contradiction, the OpenGL ES 2.0 specification is the final authority.

Chapter 6 outlines the differences from OpenGL ES 2.0 to WebGL.

http://www.khronos.org/registry/webgl/specs/latest/

\$\endgroup\$
  • \$\begingroup\$ You had a good answer, which I upvoted, but accepted the other answer because it pointed out other resources to check out. Thanks for your help. \$\endgroup\$ – Chris Smith Feb 7 '11 at 23:44
1
\$\begingroup\$

I found a great resource for comparing what specific APIs are available across different versions of OpenGL/WebGL/OpenGL ES.

I think you will find what you are looking for, here: http://web.eecs.umich.edu/~sugih/courses/eecs487/common/notes/APITables.xml

\$\endgroup\$
0
\$\begingroup\$

One way to look at it is WebGL is OpenGL ES 2.0 and OpenGL ES 2.0 is OpenGL with all the legacy cruft removed.

Since shaders were added all the legacy fixed function pipeline glPushMatrix, glLight, glVertex etc all made no sense to keep around.

So are those "missing" features or correctly and properly "deprecated" features?

What specific features are you looking for?

WebGL/OpenGL ES 2.0 is basic vertex and fragment shaders. There's limited support for non-power-of-2 textures and only a few texture formats (not really much of a limit is 99% of all textures are RGB8 or RGBA8). Support for floating point textures is optional but the majority of devices support them. Support for rendering to floating point textures is rarer though. Few if any mobile devices support rendering to a floating point texture.

WebGL2 (just shipped) and OpenGL ES 3.0 added a ton of new texture formats including integer based texture and 3D textures. It removed the non-power-of-2 texture limits. It added transform feedback (the ability for a vertex shader to write to a buffer). It also added occlusion queries. Vertex Array Objects are standard (they were optional in WebGL/ES 3.0). There's a bunch of other more minor features.

ES 3.1 (and probably the next version of WebGL) adds compute shaders (the ability for a fragment shader to do random access writes). Fragment shaders could only write to the fragment/pixel being requested of them at the moment whereas compute shaders and write anywhere they want.

What other features did you want to use?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.