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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user