From df22699cec18bd6ccd83088b50e81ddee080f751 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 15 Nov 2002 08:13:51 +0000 Subject: [PATCH] Set up the ortho projection directly, and only once. --- stepmania/src/RageDisplay.cpp | 6 ++++++ stepmania/src/StepMania.cpp | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index 831dd8fc6c..7a4b5f7095 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -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() diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index df9693d997..9914f07415 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -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 );