GetProcAddress() private method

private GetProcAddress ( [ procName ) : IntPtr
procName [
return System.IntPtr
Ejemplo n.º 1
0
 public override IntPtr GetAddress(IntPtr function)
 {
     using (new XLock(Display))
     {
         return(Glx.GetProcAddress(function));
     }
 }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
 public override IntPtr GetAddress(string function)
 {
     return(Glx.GetProcAddress(function));
 }
Ejemplo n.º 4
0
 protected override IntPtr GetAddress(string funcname)
 {
     return(Glx.GetProcAddress(funcname));
 }
Ejemplo n.º 5
0
 public override IntPtr GetAddress(string function)
 {
     using (new XLock(this.Display))
         return(Glx.GetProcAddress(function));
 }