GPU resource disposal

This commit is contained in:
gdkchan 2019-12-31 19:09:49 -03:00 committed by Thog
parent f7bcc884e4
commit 59fdaa744b
20 changed files with 195 additions and 46 deletions

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;
}
}
}
}