merge dupe EndFrame code

This commit is contained in:
Glenn Maynard
2005-07-13 00:37:43 +00:00
parent f384783335
commit fcbe90cc09
4 changed files with 10 additions and 3 deletions
+5
View File
@@ -106,6 +106,11 @@ CString RageDisplay::GetStats() const
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; }
/* Draw a line as a quad. GL_LINES with SmoothLines off can draw line
+1 -1
View File
@@ -134,7 +134,7 @@ public:
virtual void ResolutionChanged() { }
virtual bool BeginFrame() = 0;
virtual void EndFrame() = 0;
virtual void EndFrame();
virtual VideoModeParams GetVideoModeParams() const = 0;
bool IsWindowed() const { return this->GetVideoModeParams().windowed; }
+2 -1
View File
@@ -644,9 +644,10 @@ void RageDisplay_D3D::EndFrame()
{
g_pd3dDevice->EndScene();
g_pd3dDevice->Present( 0, 0, 0, 0 );
ProcessStatsOnFlip();
GraphicsWindow::Update();
RageDisplay::EndFrame();
}
bool RageDisplay_D3D::SupportsTextureFormat( PixelFormat pixfmt, bool realtime )
+2 -1
View File
@@ -734,7 +734,6 @@ void RageDisplay_OGL::EndFrame()
glFlush();
wind->SwapBuffers();
ProcessStatsOnFlip();
wind->Update();
@@ -771,6 +770,8 @@ void RageDisplay_OGL::EndFrame()
XUnlockDisplay( g_X11Display );
#endif
}
RageDisplay::EndFrame();
}
RageSurface* RageDisplay_OGL::CreateScreenshot()