set the viewport every frame
This commit is contained in:
@@ -603,11 +603,6 @@ void RageDisplay_OGL::ResolutionChanged()
|
|||||||
{
|
{
|
||||||
//LOG->Warn( "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. */
|
/* Clear any junk that's in the framebuffer. */
|
||||||
if( BeginFrame() )
|
if( BeginFrame() )
|
||||||
EndFrame();
|
EndFrame();
|
||||||
@@ -665,6 +660,13 @@ int RageDisplay_OGL::GetMaxTextureSize() const
|
|||||||
|
|
||||||
bool RageDisplay_OGL::BeginFrame()
|
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 );
|
glClearColor( 0,0,0,1 );
|
||||||
SetZWrite( true );
|
SetZWrite( true );
|
||||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
|
|||||||
Reference in New Issue
Block a user