add front face culling

This commit is contained in:
Chris Danford
2004-02-04 11:05:33 +00:00
parent 9502f1c262
commit 3ca8601390
12 changed files with 58 additions and 20 deletions
+15 -3
View File
@@ -1218,12 +1218,24 @@ void RageDisplay_OGL::SetLightDirectional(
glPopMatrix();
}
void RageDisplay_OGL::SetBackfaceCull( bool b )
void RageDisplay_OGL::SetCullMode( CullMode mode )
{
if( b )
switch( mode )
{
case CULL_BACK:
glEnable( GL_CULL_FACE );
else
glCullFace( GL_BACK );
break;
case CULL_FRONT:
glEnable( GL_CULL_FACE );
glCullFace( GL_FRONT );
break;
case CULL_NONE:
glDisable( GL_CULL_FACE );
break;
default:
ASSERT(0);
}
}
const RageDisplay::PixelFormatDesc *RageDisplay_OGL::GetPixelFormatDesc(PixelFormat pf) const