Fix D3D z-buffer problem by having separate GetOrthoMatrix functions for OGL and D3D.

I don't understand why the two APIs create an ortho matrix so differently, but I'm tried of messing with it for now.
This commit is contained in:
Chris Danford
2003-05-25 00:43:44 +00:00
parent c9b4efb861
commit a75cd6e7b1
8 changed files with 97 additions and 80 deletions
+10
View File
@@ -999,3 +999,13 @@ void RageDisplay::SetAlphaTest( bool b )
else
glDisable( GL_ALPHA_TEST );
}
RageMatrix RageDisplay::GetOrthoMatrix( 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 );
return m;
}