GPU resource disposal

This commit is contained in:
gdkchan
2020-01-09 02:13:00 +01:00
committed by Thog
parent f7bcc884e4
commit 59fdaa744b
20 changed files with 195 additions and 46 deletions
+7 -2
View File
@@ -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;
}
}
}
}