diff options
Diffstat (limited to 'Ryujinx/Ui/GLRenderer.cs')
-rw-r--r-- | Ryujinx/Ui/GLRenderer.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Ryujinx/Ui/GLRenderer.cs b/Ryujinx/Ui/GLRenderer.cs index 6d392020..e01d7d79 100644 --- a/Ryujinx/Ui/GLRenderer.cs +++ b/Ryujinx/Ui/GLRenderer.cs @@ -99,11 +99,31 @@ namespace Ryujinx.Ui GL.ClearColor(0, 0, 0, 1.0f); GL.Clear(ClearBufferMask.ColorBufferBit); - SwapBuffers(); + SwapBuffers(0); } - public override void SwapBuffers() + public override void SwapBuffers(object image) { + if((int)image != 0) + { + // The game's framebruffer is already bound, so blit it to the window's backbuffer + GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, 0); + + GL.Clear(ClearBufferMask.ColorBufferBit); + GL.ClearColor(0, 0, 0, 1); + + GL.BlitFramebuffer(0, + 0, + AllocatedWidth, + AllocatedHeight, + 0, + 0, + AllocatedWidth, + AllocatedHeight, + ClearBufferMask.ColorBufferBit, + BlitFramebufferFilter.Linear); + } + _nativeWindow.SwapBuffers(); } |