diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-31 19:09:49 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 59fdaa744b20f91928ee3fcaf5fabfcb7b409451 (patch) | |
| tree | f01e21d930e456398411317784c5063c532a7215 /Ryujinx.Graphics.OpenGL/Window.cs | |
| parent | f7bcc884e46805f4dcda4fc7d7e7bccb2a3ac316 (diff) | |
GPU resource disposal
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Window.cs')
| -rw-r--r-- | Ryujinx.Graphics.OpenGL/Window.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Window.cs b/Ryujinx.Graphics.OpenGL/Window.cs index cf520ed4..26fc6a64 100644 --- a/Ryujinx.Graphics.OpenGL/Window.cs +++ b/Ryujinx.Graphics.OpenGL/Window.cs @@ -4,7 +4,7 @@ using System; namespace Ryujinx.Graphics.OpenGL { - class Window : IWindow + class Window : IWindow, IDisposable { private const int NativeWidth = 1280; private const int NativeHeight = 720; @@ -118,5 +118,15 @@ namespace Ryujinx.Graphics.OpenGL return handle; } + + public void Dispose() + { + if (_copyFramebufferHandle != 0) + { + GL.DeleteFramebuffer(_copyFramebufferHandle); + + _copyFramebufferHandle = 0; + } + } } } |
