private GetProcAddress ( [ procName ) : |
||
procName | [ | |
return |
public override IntPtr GetAddress(IntPtr function) { using (new XLock(Display)) { return(Glx.GetProcAddress(function)); } }
/// <summary> /// Creates a System.Delegate that can be used to call a dynamically exported OpenGL function. /// </summary> /// <param name="name">The name of the OpenGL function (eg. "glNewList")</param> /// <param name="signature">The signature of the OpenGL function.</param> /// <returns> /// A System.Delegate that can be used to call this OpenGL function or null /// if the function is not available in the current OpenGL context. /// </returns> private static Delegate GetExtensionDelegate(string name, Type signature) { IntPtr address = Glx.GetProcAddress(name); if (address == IntPtr.Zero || address == new IntPtr(1) || // Workaround for buggy nvidia drivers which return address == new IntPtr(2)) // 1 or 2 instead of IntPtr.Zero for some extensions. return null; else return Marshal.GetDelegateForFunctionPointer(address, signature); }
public override IntPtr GetAddress(string function) { return(Glx.GetProcAddress(function)); }
protected override IntPtr GetAddress(string funcname) { return(Glx.GetProcAddress(funcname)); }
public override IntPtr GetAddress(string function) { using (new XLock(this.Display)) return(Glx.GetProcAddress(function)); }