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

@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Graphics.OpenGL
{
class Window : IWindow
class Window : IWindow, IDisposable
{
private const int NativeWidth = 1280;
private const int NativeHeight = 720;
@ -118,5 +118,15 @@ namespace Ryujinx.Graphics.OpenGL
return handle;
}
public void Dispose()
{
if (_copyFramebufferHandle != 0)
{
GL.DeleteFramebuffer(_copyFramebufferHandle);
_copyFramebufferHandle = 0;
}
}
}
}