mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 16:15:38 +00:00
Avoid accessing OpenTK.Graphics.OpenGL from platform-specific code. Reduces coupling and code-duplication.
This commit is contained in:
parent
25c646639b
commit
bdfa5fc9ec
|
@ -379,7 +379,7 @@ namespace OpenTK.Platform.MacOS
|
|||
|
||||
public override void LoadAll()
|
||||
{
|
||||
new OpenTK.Graphics.OpenGL.GL().LoadAll();
|
||||
base.LoadAll();
|
||||
}
|
||||
|
||||
private const string Library = "libdl.dylib";
|
||||
|
|
|
@ -205,10 +205,10 @@ namespace OpenTK.Platform.Windows
|
|||
public override void LoadAll()
|
||||
{
|
||||
Wgl.LoadAll();
|
||||
new GL().LoadAll();
|
||||
|
||||
vsync_supported = Wgl.Arb.SupportsExtension(this, "WGL_EXT_swap_control") &&
|
||||
Wgl.Load("wglGetSwapIntervalEXT") && Wgl.Load("wglSwapIntervalEXT");
|
||||
|
||||
base.LoadAll();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -269,10 +269,11 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
public override void LoadAll()
|
||||
{
|
||||
new OpenTK.Graphics.OpenGL.GL().LoadAll();
|
||||
new Glx().LoadAll();
|
||||
vsync_supported = this.GetAddress("glXSwapIntervalSGI") != IntPtr.Zero;
|
||||
Debug.Print("Context supports vsync: {0}.", vsync_supported);
|
||||
|
||||
base.LoadAll();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue