mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-25 21:36:50 +01:00
2989c163a8
* editorconfig: Add default charset * Change file encoding from UTF-8-BOM to UTF-8
27 lines
646 B
C#
27 lines
646 B
C#
using Ryujinx.Graphics.OpenGL.Helper;
|
|
using System;
|
|
|
|
namespace Ryujinx.Graphics.OpenGL
|
|
{
|
|
public interface IOpenGLContext : IDisposable
|
|
{
|
|
void MakeCurrent();
|
|
|
|
// TODO: Support more APIs per platform.
|
|
static bool HasContext()
|
|
{
|
|
if (OperatingSystem.IsWindows())
|
|
{
|
|
return WGLHelper.GetCurrentContext() != IntPtr.Zero;
|
|
}
|
|
else if (OperatingSystem.IsLinux())
|
|
{
|
|
return GLXHelper.GetCurrentContext() != IntPtr.Zero;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|