Do SetDefaultRenderStates in BeginFrame, instead of on init,

so we don't depend on state being preserved long-term, and
so every renderer doesn't have to do this.
This commit is contained in:
Glenn Maynard
2006-07-25 20:10:56 +00:00
parent 90d4dc17d5
commit 9c73aed254
4 changed files with 19 additions and 10 deletions
+3 -4
View File
@@ -598,8 +598,6 @@ RString RageDisplay_OGL::TryVideoMode( const VideoModeParams &p, bool &bNewDevic
InitScalingScript();
}
this->SetDefaultRenderStates();
/* Set vsync the Windows way, if we can. (What other extensions are there
* to do this, for other archs?) */
if( GLExt.wglSwapIntervalEXT )
@@ -629,7 +627,8 @@ bool RageDisplay_OGL::BeginFrame()
glClearColor( 0,0,0,1 );
SetZWrite( true );
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
return true;
return RageDisplay::BeginFrame();
}
void RageDisplay_OGL::EndFrame()
@@ -1584,7 +1583,7 @@ void RageDisplay_OGL::EndConcurrentRenderingMainThread()
void RageDisplay_OGL::BeginConcurrentRendering()
{
g_pWind->BeginConcurrentRendering();
SetDefaultRenderStates();
RageDisplay::BeginConcurrentRendering();
}
void RageDisplay_OGL::EndConcurrentRendering()