mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 16:01:15 +00:00
[Graphics] GetAddress(string) is no longer needed
This commit is contained in:
parent
fbeac9c323
commit
433fa35f7e
|
@ -92,7 +92,13 @@ namespace OpenTK.Graphics
|
|||
|
||||
public ContextHandle Context { get { return Handle; } }
|
||||
|
||||
public abstract IntPtr GetAddress(string function);
|
||||
// This function is no longer used.
|
||||
// The GraphicsContext facade will
|
||||
// always call the IntPtr overload.
|
||||
public IntPtr GetAddress(string function)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public abstract IntPtr GetAddress(IntPtr function);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace OpenTK.Platform
|
|||
new OpenTK.Graphics.ES20.GL().LoadEntryPoints();
|
||||
new OpenTK.Graphics.ES30.GL().LoadEntryPoints();
|
||||
|
||||
Debug.Print("Bindings loaded in {0} ms.", time.Elapsed.TotalMilliseconds);
|
||||
Trace.WriteLine(String.Format("Bindings loaded in {0} ms.", time.Elapsed.TotalMilliseconds));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,14 +79,10 @@ namespace OpenTK.Platform.Dummy
|
|||
get { return current_thread != null && current_thread == Thread.CurrentThread; }
|
||||
}
|
||||
|
||||
public override IntPtr GetAddress(string function)
|
||||
{
|
||||
return Loader(function);
|
||||
}
|
||||
|
||||
public override IntPtr GetAddress(IntPtr function)
|
||||
{
|
||||
return IntPtr.Zero;
|
||||
string str = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(function);
|
||||
return Loader(str);
|
||||
}
|
||||
|
||||
public override int SwapInterval
|
||||
|
|
|
@ -136,11 +136,6 @@ namespace OpenTK.Platform.Egl
|
|||
|
||||
#region IGraphicsContextInternal Members
|
||||
|
||||
public override IntPtr GetAddress(string function)
|
||||
{
|
||||
return Egl.GetProcAddress(function);
|
||||
}
|
||||
|
||||
public override IntPtr GetAddress(IntPtr function)
|
||||
{
|
||||
return Egl.GetProcAddress(function);
|
||||
|
|
|
@ -344,11 +344,6 @@ namespace OpenTK.Platform.SDL2
|
|||
}
|
||||
}
|
||||
|
||||
public override IntPtr GetAddress(string function)
|
||||
{
|
||||
return SDL.GL.GetProcAddress(function);
|
||||
}
|
||||
|
||||
public override IntPtr GetAddress(IntPtr function)
|
||||
{
|
||||
return SDL.GL.GetProcAddress(function);
|
||||
|
|
|
@ -374,16 +374,6 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
#region GetAddress
|
||||
|
||||
public override IntPtr GetAddress(string function_string)
|
||||
{
|
||||
IntPtr address = Wgl.GetProcAddress(function_string);
|
||||
if (!IsValid(address))
|
||||
{
|
||||
address = Functions.GetProcAddress(WinFactory.OpenGLHandle, function_string);
|
||||
}
|
||||
return address;
|
||||
}
|
||||
|
||||
public override IntPtr GetAddress(IntPtr function_string)
|
||||
{
|
||||
IntPtr address = Wgl.GetProcAddress(function_string);
|
||||
|
|
|
@ -395,14 +395,6 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
#region GetAddress
|
||||
|
||||
public override IntPtr GetAddress(string function)
|
||||
{
|
||||
using (new XLock(Display))
|
||||
{
|
||||
return Glx.GetProcAddress(function);
|
||||
}
|
||||
}
|
||||
|
||||
public override IntPtr GetAddress(IntPtr function)
|
||||
{
|
||||
using (new XLock(Display))
|
||||
|
|
Loading…
Reference in a new issue