1
0
Fork 0
forked from suyu/suyu

Merge pull request from lioncash/global

renderer_opengl: Remove reference to global system instance
This commit is contained in:
bunnei 2019-02-12 21:40:31 -05:00 committed by GitHub
commit c425a1a857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,7 +107,7 @@ RendererOpenGL::~RendererOpenGL() = default;
void RendererOpenGL::SwapBuffers( void RendererOpenGL::SwapBuffers(
std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) { std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) {
Core::System::GetInstance().GetPerfStats().EndSystemFrame(); system.GetPerfStats().EndSystemFrame();
// Maintain the rasterizer's state as a priority // Maintain the rasterizer's state as a priority
OpenGLState prev_state = OpenGLState::GetCurState(); OpenGLState prev_state = OpenGLState::GetCurState();
@ -137,8 +137,8 @@ void RendererOpenGL::SwapBuffers(
render_window.PollEvents(); render_window.PollEvents();
Core::System::GetInstance().FrameLimiter().DoFrameLimiting(Core::Timing::GetGlobalTimeUs()); system.FrameLimiter().DoFrameLimiting(Core::Timing::GetGlobalTimeUs());
Core::System::GetInstance().GetPerfStats().BeginSystemFrame(); system.GetPerfStats().BeginSystemFrame();
// Restore the rasterizer state // Restore the rasterizer state
prev_state.Apply(); prev_state.Apply();