How Primitive WebGL Is?

I was much disappointed when I started to learn WebGL and here I will tell why.

WebGL Public Wiki page about differences between WebGL and OpenGL tells us that the differences are:

  • problems with non-power of two texture support
  • behavior of vertex attribute 0
  • no double-precision floating point support
  • no 3D texture support
  • textureLod functions are only available at vertex shaders
  • precision qualifiers behavior.

Doesn't sound much catastrophic, I thought. But now I can expand this list... a little.

  • say goodbye to glBegin/glEnd. All data should now be handled only via array buffers (glCreateBuffer). And there is also no default shader program now (glUseProgram(0) in OpenGL), you have to write your own shaders anyway.
  • no floating point support AT ALL! To create a texture from a floating point data you'll have to enable OES_texture_float or OES_texture_half_float extension. But that won't help you if you wish for a floating point internal format in your textures (in a framebuffer attachment, for example). Add one more extension (WEBGL_color_buffer_float or EXT_color_buffer_half_float) to achieve that. By the way, two last ones are not currently supported by Chrome.
  • no support for attaching whole cube maps to framebuffers (only faces). aaaand also
  • NO GEOMETRY SHADERS, HELL YEAH. (And of course no tesselation shaders.)

I'm done with it.