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/Renderer.cs | |
| parent | f7bcc884e46805f4dcda4fc7d7e7bccb2a3ac316 (diff) | |
GPU resource disposal
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Renderer.cs')
| -rw-r--r-- | Ryujinx.Graphics.OpenGL/Renderer.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs index 7cb69a78..e6021f51 100644 --- a/Ryujinx.Graphics.OpenGL/Renderer.cs +++ b/Ryujinx.Graphics.OpenGL/Renderer.cs @@ -4,9 +4,11 @@ using Ryujinx.Graphics.Shader; namespace Ryujinx.Graphics.OpenGL { - public class Renderer : IRenderer + public sealed class Renderer : IRenderer { - public IPipeline Pipeline { get; } + private Pipeline _pipeline; + + public IPipeline Pipeline => _pipeline; private readonly Counters _counters; @@ -18,7 +20,7 @@ namespace Ryujinx.Graphics.OpenGL public Renderer() { - Pipeline = new Pipeline(); + _pipeline = new Pipeline(); _counters = new Counters(); @@ -81,5 +83,12 @@ namespace Ryujinx.Graphics.OpenGL { _counters.ResetCounter(type); } + + public void Dispose() + { + TextureCopy.Dispose(); + _pipeline.Dispose(); + _window.Dispose(); + } } } |
