1
function glOrthof( left, right, bottom, top, zNear, zFar )
3
% glOrthof Interface to OpenGL-ES function glOrthof
5
% usage: glOrthof( left, right, bottom, top, zNear, zFar )
7
% C function: void glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
9
% 25-Mar-2011 -- created (generated automatically from header files)
10
% 4-Apr-2013 Made compatible with OpenGL-ES.
15
error('invalid number of arguments');
19
moglcore( 'glOrtho', left, right, bottom, top, zNear, zFar );
24
m(1,1) = 2 / (right - left);
25
m(2,2) = 2 / (top - bottom);
26
m(3,3) = -2 / (zFar - zNear);
28
m(1,4) = -(right + left) / (right - left);
29
m(2,4) = -(top + bottom) / (top - bottom);
30
m(3,4) = -(zFar + zNear) / (zFar - zNear);
32
% TODO FIXME: Need m transposed m' ?