GPU resource disposal
This commit is contained in:
parent
f7bcc884e4
commit
59fdaa744b
20 changed files with 195 additions and 46 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue