[Graphics] Redirect GetAddress(string)

GetAddress(string) now calls GetAddress(IntPtr) internally. This
reduces the number of APIs that must be implemented for each platform.
This commit is contained in:
thefiddler 2014-04-26 14:19:19 +02:00
parent 9605940661
commit fbeac9c323

View file

@ -601,7 +601,10 @@ namespace OpenTK.Graphics
/// </returns>
IntPtr IGraphicsContextInternal.GetAddress(string function)
{
return (implementation as IGraphicsContextInternal).GetAddress(function);
IntPtr name = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(function);
IntPtr address = (implementation as IGraphicsContextInternal).GetAddress(name);
System.Runtime.InteropServices.Marshal.FreeHGlobal(name);
return address;
}
/// <summary>