Esempio n. 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();
        }
Esempio n. 2
0
 public void *GLGetProcAddress(string procName)
 {
     return((void *)GLFW.GetProcAddress(procName));
 }
 public IntPtr GetProcAddress(string name)
 {
     return(GLFW.GetProcAddress(name));
 }
Esempio n. 4
0
 public IntPtr GetProcAddress(string procName)
 {
     return(GLFW.GetProcAddress(procName));
 }
Esempio n. 5
0
 /// <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);