Fix ortho projections in OpenGL.
D3D still isn't correct.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user