elefher / glmatrix

Automatically exported from code.google.com/p/glmatrix
0 stars 0 forks source link

mat4.ortho is upside down #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The mat4.ortho function is different from the glOrtho implementation (found at 
http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml),  which switches the 
positive and negative directions.

Fixed by changing:

1247 dest[12] = (left + right) / rl;
1248 dest[13] = (top + bottom) / tb;
1249 dest[14] = (far + near) / fn;

to:

1247 dest[12] = -(left + right) / rl;
1248 dest[13] = -(top + bottom) / tb;
1249 dest[14] = -(far + near) / fn;

Cheers for the library - it's super useful,
Joe

Original issue reported on code.google.com by orphansa...@gmail.com on 23 Sep 2010 at 3:23

GoogleCodeExporter commented 8 years ago

Original comment by Tojiro@gmail.com on 10 Oct 2010 at 3:57

GoogleCodeExporter commented 8 years ago

Original comment by Tojiro@gmail.com on 27 Feb 2011 at 6:18