diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-27 02:04:35 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-27 03:16:49 +0200 |
commit | 1a9df83535589ced8c3bc66ffa620b3cb6d86074 (patch) | |
tree | d23b412f058d4115f427e1ef802f26a865236102 /src/video_core/renderer_opengl/renderer_opengl.cpp | |
parent | Merge pull request #283 from Subv/tsc (diff) | |
download | yuzu-1a9df83535589ced8c3bc66ffa620b3cb6d86074.tar yuzu-1a9df83535589ced8c3bc66ffa620b3cb6d86074.tar.gz yuzu-1a9df83535589ced8c3bc66ffa620b3cb6d86074.tar.bz2 yuzu-1a9df83535589ced8c3bc66ffa620b3cb6d86074.tar.lz yuzu-1a9df83535589ced8c3bc66ffa620b3cb6d86074.tar.xz yuzu-1a9df83535589ced8c3bc66ffa620b3cb6d86074.tar.zst yuzu-1a9df83535589ced8c3bc66ffa620b3cb6d86074.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 1a24855d7..85e91c0e2 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -100,6 +100,8 @@ RendererOpenGL::~RendererOpenGL() = default; /// Swap buffers (render frame) void RendererOpenGL::SwapBuffers(boost::optional<const Tegra::FramebufferConfig&> framebuffer) { + Core::System::GetInstance().perf_stats.EndSystemFrame(); + // Maintain the rasterizer's state as a priority OpenGLState prev_state = OpenGLState::GetCurState(); state.Apply(); @@ -114,20 +116,19 @@ void RendererOpenGL::SwapBuffers(boost::optional<const Tegra::FramebufferConfig& // performance problem. ConfigureFramebufferTexture(screen_info.texture, *framebuffer); } + + // Load the framebuffer from memory, draw it to the screen, and swap buffers LoadFBToScreenInfo(*framebuffer, screen_info); + DrawScreens(); + render_window->SwapBuffers(); } - DrawScreens(); - - Core::System::GetInstance().perf_stats.EndSystemFrame(); - - // Swap buffers render_window->PollEvents(); - render_window->SwapBuffers(); Core::System::GetInstance().frame_limiter.DoFrameLimiting(CoreTiming::GetGlobalTimeUs()); Core::System::GetInstance().perf_stats.BeginSystemFrame(); + // Restore the rasterizer state prev_state.Apply(); RefreshRasterizerSetting(); } |