Fix ortho projections in OpenGL.

D3D still isn't correct.
This commit is contained in:
Glenn Maynard
2003-05-23 21:10:25 +00:00
parent de5f156e4d
commit 5e8eaf3096
+7
View File
@@ -442,11 +442,18 @@ RageMatrix RageLookAt(
RageMatrix RageOrtho( float l, float r, float b, float t, float zn, float zf )
{
RageMatrix m(
2/(r-l), 0, 0, 0,
0, 2/(t-b), 0, 0,
0, 0, -2/(zf-zn), 0,
-(r+l)/(r-l), -(t+b)/(t-b), -(zf+zn)/(zf-zn), 1 );
/*
RageMatrix m(
2/(r-l), 0, 0, 0,
0, 2/(t-b), 0, 0,
0, 0, 1/(zf-zn), 0,
(l+r)/(l-r), (t+b)/(b-t), zn/(zn-zf), 1 );
*/
return m;
}