fix centering matrix + perspective projections

This commit is contained in:
Chris Danford
2004-10-24 22:59:10 +00:00
parent a374bda82f
commit 0a6acd94ae
8 changed files with 61 additions and 42 deletions
+8 -4
View File
@@ -836,14 +836,18 @@ static void SetupVertices( const RageSpriteVertex v[], int iNumVerts )
void RageDisplay_OGL::SendCurrentMatrices()
{
RageMatrix projection;
RageMatrixMultiply( &projection, GetCentering(), GetProjectionTop() );
glMatrixMode( GL_PROJECTION );
glLoadMatrixf( (const float*)GetProjectionTop() );
glLoadMatrixf( (const float*)&projection );
// OpenGL has just "modelView", whereas D3D has "world" and "view"
RageMatrix modelView;
RageMatrixMultiply( &modelView, GetCentering(), GetViewTop() );
RageMatrixMultiply( &modelView, &modelView, GetWorldTop() );
RageMatrixMultiply( &modelView, GetViewTop(), GetWorldTop() );
glMatrixMode( GL_MODELVIEW );
glLoadMatrixf( (const float*)&modelView );
glMatrixMode( GL_TEXTURE );
glMatrixMode( GL_TEXTURE );
glLoadMatrixf( (const float*)GetTextureTop() );
}