merge dupe EndFrame code
This commit is contained in:
@@ -106,6 +106,11 @@ CString RageDisplay::GetStats() const
|
|||||||
return ssprintf( "%i FPS\n%i av FPS\n%i VPF", GetFPS(), GetCumFPS(), GetVPF() );
|
return ssprintf( "%i FPS\n%i av FPS\n%i VPF", GetFPS(), GetCumFPS(), GetVPF() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RageDisplay::EndFrame()
|
||||||
|
{
|
||||||
|
ProcessStatsOnFlip();
|
||||||
|
}
|
||||||
|
|
||||||
void RageDisplay::StatsAddVerts( int iNumVertsRendered ) { g_iVertsRenderedSinceLastCheck += iNumVertsRendered; }
|
void RageDisplay::StatsAddVerts( int iNumVertsRendered ) { g_iVertsRenderedSinceLastCheck += iNumVertsRendered; }
|
||||||
|
|
||||||
/* Draw a line as a quad. GL_LINES with SmoothLines off can draw line
|
/* Draw a line as a quad. GL_LINES with SmoothLines off can draw line
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public:
|
|||||||
virtual void ResolutionChanged() { }
|
virtual void ResolutionChanged() { }
|
||||||
|
|
||||||
virtual bool BeginFrame() = 0;
|
virtual bool BeginFrame() = 0;
|
||||||
virtual void EndFrame() = 0;
|
virtual void EndFrame();
|
||||||
virtual VideoModeParams GetVideoModeParams() const = 0;
|
virtual VideoModeParams GetVideoModeParams() const = 0;
|
||||||
bool IsWindowed() const { return this->GetVideoModeParams().windowed; }
|
bool IsWindowed() const { return this->GetVideoModeParams().windowed; }
|
||||||
|
|
||||||
|
|||||||
@@ -644,9 +644,10 @@ void RageDisplay_D3D::EndFrame()
|
|||||||
{
|
{
|
||||||
g_pd3dDevice->EndScene();
|
g_pd3dDevice->EndScene();
|
||||||
g_pd3dDevice->Present( 0, 0, 0, 0 );
|
g_pd3dDevice->Present( 0, 0, 0, 0 );
|
||||||
ProcessStatsOnFlip();
|
|
||||||
|
|
||||||
GraphicsWindow::Update();
|
GraphicsWindow::Update();
|
||||||
|
|
||||||
|
RageDisplay::EndFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RageDisplay_D3D::SupportsTextureFormat( PixelFormat pixfmt, bool realtime )
|
bool RageDisplay_D3D::SupportsTextureFormat( PixelFormat pixfmt, bool realtime )
|
||||||
|
|||||||
@@ -734,7 +734,6 @@ void RageDisplay_OGL::EndFrame()
|
|||||||
glFlush();
|
glFlush();
|
||||||
|
|
||||||
wind->SwapBuffers();
|
wind->SwapBuffers();
|
||||||
ProcessStatsOnFlip();
|
|
||||||
|
|
||||||
wind->Update();
|
wind->Update();
|
||||||
|
|
||||||
@@ -771,6 +770,8 @@ void RageDisplay_OGL::EndFrame()
|
|||||||
XUnlockDisplay( g_X11Display );
|
XUnlockDisplay( g_X11Display );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RageDisplay::EndFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
RageSurface* RageDisplay_OGL::CreateScreenshot()
|
RageSurface* RageDisplay_OGL::CreateScreenshot()
|
||||||
|
|||||||
Reference in New Issue
Block a user