Set up the ortho projection directly, and only once.
This commit is contained in:
@@ -134,6 +134,12 @@ void RageDisplay::SetupOpenGL()
|
|||||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
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_MAG_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_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()
|
RageDisplay::~RageDisplay()
|
||||||
|
|||||||
@@ -598,9 +598,6 @@ void GameLoop()
|
|||||||
|
|
||||||
RageMatrix mat;
|
RageMatrix mat;
|
||||||
|
|
||||||
RageMatrixOrthoOffCenterLH( &mat, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, SCREEN_NEAR, SCREEN_FAR );
|
|
||||||
DISPLAY->SetProjectionTransform( &mat );
|
|
||||||
|
|
||||||
RageMatrixIdentity( &mat );
|
RageMatrixIdentity( &mat );
|
||||||
DISPLAY->SetViewTransform( &mat );
|
DISPLAY->SetViewTransform( &mat );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user