set the viewport every frame

This commit is contained in:
Glenn Maynard
2006-01-18 09:18:17 +00:00
parent 4cd44f16dc
commit de00a196d6
+7 -5
View File
@@ -603,11 +603,6 @@ void RageDisplay_OGL::ResolutionChanged()
{
//LOG->Warn( "RageDisplay_OGL::ResolutionChanged" );
int fWidth = g_pWind->GetActualVideoModeParams().width;
int fHeight = g_pWind->GetActualVideoModeParams().height;
glViewport( 0, 0, fWidth, fHeight );
/* Clear any junk that's in the framebuffer. */
if( BeginFrame() )
EndFrame();
@@ -665,6 +660,13 @@ int RageDisplay_OGL::GetMaxTextureSize() const
bool RageDisplay_OGL::BeginFrame()
{
/* We do this in here, rather than ResolutionChanged, or we won't update the
* viewport for the concurrent rendering context. */
int fWidth = g_pWind->GetActualVideoModeParams().width;
int fHeight = g_pWind->GetActualVideoModeParams().height;
glViewport( 0, 0, fWidth, fHeight );
glClearColor( 0,0,0,1 );
SetZWrite( true );
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );