floating-point zbias. For compatibility, 0 is off and 1 is the old "zbias on".

Going beyond 1 is allowed, but the usable/useful range of values is currently
undefined--try to stick to 0..1.
This commit is contained in:
Glenn Maynard
2005-05-06 04:05:02 +00:00
parent 52520f2135
commit 47db6ca9c4
8 changed files with 19 additions and 19 deletions
+5 -5
View File
@@ -1517,12 +1517,12 @@ void RageDisplay_OGL::SetZWrite( bool b )
glDepthMask( b );
}
void RageDisplay_OGL::SetZBias( bool b )
void RageDisplay_OGL::SetZBias( float f )
{
if( b )
glDepthRange( 0.0, 0.95 );
else
glDepthRange( 0.05, 1.0 );
float fNear = SCALE( f, 0.0f, 1.0f, 0.05f, 0.0f );
float fFar = SCALE( f, 0.0f, 1.0f, 1.0f, 0.95f );
glDepthRange( fNear, fFar );
}
void RageDisplay_OGL::SetZTestMode( ZTestMode mode )