aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Window.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Window.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Window.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Window.cs b/Ryujinx.Graphics.OpenGL/Window.cs
index a2f4e4ce..4abc408e 100644
--- a/Ryujinx.Graphics.OpenGL/Window.cs
+++ b/Ryujinx.Graphics.OpenGL/Window.cs
@@ -1,4 +1,7 @@
+using OpenTK;
+using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
+using OpenTK.Platform;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.OpenGL.Image;
using System;
@@ -17,6 +20,8 @@ namespace Ryujinx.Graphics.OpenGL
private int _copyFramebufferHandle;
+ internal BackgroundContextWorker BackgroundContext { get; private set; }
+
public Window(Renderer renderer)
{
_renderer = renderer;
@@ -161,8 +166,15 @@ namespace Ryujinx.Graphics.OpenGL
return handle;
}
+ public void InitializeBackgroundContext(IGraphicsContext baseContext)
+ {
+ BackgroundContext = new BackgroundContextWorker(baseContext);
+ }
+
public void Dispose()
{
+ BackgroundContext.Dispose();
+
if (_copyFramebufferHandle != 0)
{
GL.DeleteFramebuffer(_copyFramebufferHandle);