コード例 #1
0
        protected override void OnLoad()
        {
            var iface = GRGlInterface.AssembleGlInterface((_, proc) =>
            {
                if (proc.StartsWith("egl"))
                {
                    return(IntPtr.Zero);
                }
                if (proc == "glShaderSource")
                {
                    return(new ShaderProxy(GLFW.GetProcAddress(proc.ToString())).Pointer);
                }
                return(GLFW.GetProcAddress(proc.ToString()));
            });

            GrContext = GRContext.CreateGl(iface);
            base.OnLoad();
        }
コード例 #2
0
 public void *GLGetProcAddress(string procName)
 {
     return((void *)GLFW.GetProcAddress(procName));
 }
コード例 #3
0
 public IntPtr GetProcAddress(string name)
 {
     return(GLFW.GetProcAddress(name));
 }
コード例 #4
0
ファイル: Glfw.Windows.cs プロジェクト: Ygg01/RobustToolbox
 public IntPtr GetProcAddress(string procName)
 {
     return(GLFW.GetProcAddress(procName));
 }
コード例 #5
0
ファイル: GLFWBindingsContext.cs プロジェクト: HughPH/opentk
 /// <summary>
 ///     Retrieves an unmanaged function pointer to the specified function on the specified bindings context.
 /// </summary>
 /// <param name="procName">An ASCII-encoded string that defines the name of the function.</param>
 /// <returns>
 ///     A <see cref="System.IntPtr" /> that contains the address of procName or IntPtr.Zero,
 ///     if the function is not supported by the drivers.
 /// </returns>
 /// <remarks>
 ///     Note: some drivers are known to return non-zero values for unsupported functions.
 ///     Typical values include 1 and 2 - inheritors are advised to check for and ignore these
 ///     values.
 /// </remarks>
 public IntPtr GetProcAddress(string procName) => GLFW.GetProcAddress(procName);