Skip to content

Commit

Permalink
Fix using predictive frame rendering with OpenGL. However background …
Browse files Browse the repository at this point in the history
…videos flicker so I might disable it altogether for OpenGL unless I can fix that.
  • Loading branch information
xwidghet committed Oct 25, 2016
1 parent 4a1dca9 commit edbb2df
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/RageDisplay_OGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,13 +785,12 @@ bool RageDisplay_Legacy::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 );

if (DISPLAY->ShouldRenderFrame())
if (!DISPLAY || DISPLAY->ShouldRenderFrame())
{
int fWidth = (*g_pWind->GetActualVideoModeParams()).width;
int fHeight = (*g_pWind->GetActualVideoModeParams()).height;
glViewport(0, 0, fWidth, fHeight);
glClearColor(0, 0, 0, 0);
SetZWrite(true);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Expand Down

0 comments on commit edbb2df

Please sign in to comment.