aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/VertexArray.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2019-12-31 19:09:49 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit59fdaa744b20f91928ee3fcaf5fabfcb7b409451 (patch)
treef01e21d930e456398411317784c5063c532a7215 /Ryujinx.Graphics.OpenGL/VertexArray.cs
parentf7bcc884e46805f4dcda4fc7d7e7bccb2a3ac316 (diff)
GPU resource disposal
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/VertexArray.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/VertexArray.cs9
1 files changed, 7 insertions, 2 deletions
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;
+ }
}
}
}