From 59fdaa744b20f91928ee3fcaf5fabfcb7b409451 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 31 Dec 2019 19:09:49 -0300 Subject: GPU resource disposal --- Ryujinx.Graphics.OpenGL/VertexArray.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.OpenGL/VertexArray.cs') diff --git a/Ryujinx.Graphics.OpenGL/VertexArray.cs b/Ryujinx.Graphics.OpenGL/VertexArray.cs index 26e63364..721a90f0 100644 --- a/Ryujinx.Graphics.OpenGL/VertexArray.cs +++ b/Ryujinx.Graphics.OpenGL/VertexArray.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.OpenGL { class VertexArray : IDisposable { - public int Handle { get; } + public int Handle { get; private set; } private bool _needsAttribsUpdate; @@ -128,7 +128,12 @@ namespace Ryujinx.Graphics.OpenGL public void Dispose() { - GL.DeleteVertexArray(Handle); + if (Handle != 0) + { + GL.DeleteVertexArray(Handle); + + Handle = 0; + } } } } -- cgit v1.2.3