Why must the transpose value of glUniformMatrix4fv in webgl/OpenGL ES be false?

The OpenGL ES spec says that the transpose value must be false or an INVALID_VALUE is generated. Why then have the parameter?

up vote 5 down vote accepted

The parameter exists because the OpenGL ES spec conforms to the OpenGL spec : OpenGL ES 2.0 is defined relative to the OpenGL 2.0 specification

In the OpenGL spec, this parameter exists hence it also exists in the OpenGL ES spec, even if it is unused.

Because OES is a subset of standard OpenGL, and the functions must have the same parameters in both implementations. In OpenGL the parameter transpose is used to specify if the matrix is in row-major or column-major order, but since OES only supports column-major, it must be always false.

  • 2
    Note that OpenGL ES is not a strict subset of desktop GL. While both have a function call glTexImage2D, the parameters they take (particularly the pixel format) are very different. Values that are legal in ES are illegal in desktop GL, and vice-versa. – Nicol Bolas Jul 20 '11 at 21:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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