Set up the ortho projection directly, and only once.

This commit is contained in:
Glenn Maynard
2002-11-15 08:13:51 +00:00
parent 9169da5b9d
commit df22699cec
2 changed files with 6 additions and 3 deletions
+6
View File
@@ -134,6 +134,12 @@ void RageDisplay::SetupOpenGL()
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
/* Initialize the default ortho projection. */
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, SCREEN_NEAR, SCREEN_FAR );
glMatrixMode( GL_MODELVIEW );
}
RageDisplay::~RageDisplay()
-3
View File
@@ -598,9 +598,6 @@ void GameLoop()
RageMatrix mat;
RageMatrixOrthoOffCenterLH( &mat, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, SCREEN_NEAR, SCREEN_FAR );
DISPLAY->SetProjectionTransform( &mat );
RageMatrixIdentity( &mat );
DISPLAY->SetViewTransform( &mat );