[Graphics] GetAddress(string) is no longer needed

This commit is contained in:
thefiddler 2014-04-26 14:20:17 +02:00
parent fbeac9c323
commit 433fa35f7e
7 changed files with 10 additions and 36 deletions

View file

@ -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);

View file

@ -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));
}
}
}

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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))