The OpenGL specification (4.2 core) states in section 8.5The <type> parameter is not superfluous. It is the only way the OpenGL implementation knows what type of data the application is providing. For the integer case you cited, there are several integer formats that could be used to supply that data. They are not disambiguated by <format>.
...format, type, and data specify the format of the image dataand it also states that
Textures with integer internal formats (see table 8.12) require integer data.
An INVALID_OPERATION error is generated if the internal format is integer
and format is not one of the integer formats listed in table 8.3, or if the internal
format is not integer and format is an integer format
For OpenGL, the type parameter is superfluous because it *has* to match the internal formats type and the data buffer *has* to match the type.
For ES 2.0, unfortunately, <format> and <type> do not specify the internal format completely. The implementation has freedom to choose the number of bits at which it stores each component.For OpenGL ES the type parameter is the only way to "specify" an internal format completely, and the data equally (presumably) *has* to match the type.
The data absolutely has the match the type. If it does not, the
application is likely to crash. If it does not crash, the texture
will be nonsense.
As I said when I started this thread (and again above), if you try that in native ES the app will most likely crash. The app has to first convert the data from unsigned byte array to FLOAT.
Therefore, since WebGL is modelled after OpenGL ES:1) It should not be possible to create a floating point texture by passing an unsigned byte array (which by extension means <img> objects)2) The only way you can specify a floating point texture is with the second flavor call that accepts a type.
OES_required_internal_format.3) WebGLs current interpretation of the ES spec is correct.4) WebGLs OES_texture_float is correct5) GL_RGBA32F or the like are Desktop OpenGL specific terminology that do not apply to OpenGL ES, and introducing new internal format types is not supported by the ES spec nor any extension.
NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.