diff options
Diffstat (limited to 'src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs')
| -rw-r--r-- | src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs b/src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs deleted file mode 100644 index 63bf6cf7..00000000 --- a/src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs +++ /dev/null @@ -1,49 +0,0 @@ -using OpenTK.Graphics.OpenGL; -using Ryujinx.Graphics.OpenGL; -using SPB.Graphics; -using SPB.Graphics.OpenGL; -using SPB.Platform; -using SPB.Windowing; - -namespace Ryujinx.Ava.UI.Renderer -{ - class SPBOpenGLContext : IOpenGLContext - { - private readonly OpenGLContextBase _context; - private readonly NativeWindowBase _window; - - private SPBOpenGLContext(OpenGLContextBase context, NativeWindowBase window) - { - _context = context; - _window = window; - } - - public void Dispose() - { - _context.Dispose(); - _window.Dispose(); - } - - public void MakeCurrent() - { - _context.MakeCurrent(_window); - } - - public bool HasContext() => _context.IsCurrent; - - public static SPBOpenGLContext CreateBackgroundContext(OpenGLContextBase sharedContext) - { - OpenGLContextBase context = PlatformHelper.CreateOpenGLContext(FramebufferFormat.Default, 3, 3, OpenGLContextFlags.Compat, true, sharedContext); - NativeWindowBase window = PlatformHelper.CreateOpenGLWindow(FramebufferFormat.Default, 0, 0, 100, 100); - - context.Initialize(window); - context.MakeCurrent(window); - - GL.LoadBindings(new OpenTKBindingsContext(context.GetProcAddress)); - - context.MakeCurrent(null); - - return new SPBOpenGLContext(context, window); - } - } -} |
