View Full Version : non-square matrices product ?

08-03-2006, 08:59 AM

I enjoy the release of OpenGL 2.1 and GLSL 1.2 specifications. However, I havan't found some detail about non-square matrices product.

Could we do that: mat4x3 * mat3*4 and what is the result that GLSL should give?

It seams available according to the specification but mathematically it isn't so it should have a trick somewhere.


PS: I was espected the release of new extension as well, a final version of GL_ARB_sync and maybe GL_ARB_framebuffer_object. What happen to them?

08-03-2006, 09:52 AM
Actually, you can:

http://tinyurl.com/6w7yo (http://en.wikipedia.org/wiki/Matrix_%28mathematics%29 (http://tinyurl.com/6w7yo))

08-03-2006, 12:26 PM
All right, I take bad exemple. mat4x3 * mat4x3 we can't.

08-03-2006, 01:20 PM
Quote from spec (I added the bold):

For multiply (*), one operand can be a floating-point vector and the other a matrix, treating a right vector operand as a column vector and a left vector operand as a row vector, or the two operands can both be matrices. These cases require that the number of columns of the left operand is equal to the number of rows of the right operand .

08-04-2006, 04:55 AM
Chapter 5.9 cheers