{"record":{"id":"4809a58b0a4ea6c4","repo":"unoplatform/uno","slug":"no-function-was-found-with-the-name-proc","errorCode":null,"errorMessage":"No function was found with the name {proc}.","messagePattern":"No function was found with the name (.+?)\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/AddIns/Uno.WinUI.Graphics3DGL/Windows/WinUINativeOpenGLWrapper.cs","lineNumber":98,"sourceCode":"\tpublic bool TryGetProcAddress(string proc, out nint addr)\n\t{\n\t\tif (_opengl32.Value != IntPtr.Zero && NativeLibrary.TryGetExport(_opengl32.Value, proc, out addr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\taddr = WindowsRenderingNativeMethods.wglGetProcAddress(proc);\n\t\treturn addr != IntPtr.Zero;\n\t}\n\n\tpublic nint GetProcAddress(string proc)\n\t{\n\t\tif (TryGetProcAddress(proc, out var address))\n\t\t{\n\t\t\treturn address;\n\t\t}\n\n\t\tthrow new InvalidOperationException(\"No function was found with the name \" + proc + \".\");\n\t}\n\n\tpublic void Dispose()\n\t{\n\t\tif (WindowsRenderingNativeMethods.wglDeleteContext(_glContext) == 0)\n\t\t{\n\t\t\tif (this.Log().IsEnabled(LogLevel.Error))\n\t\t\t{\n\t\t\t\tthis.Log().Error($\"{nameof(WindowsRenderingNativeMethods.wglDeleteContext)} failed.\");\n\t\t\t}\n\t\t}\n\t\t_glContext = default;\n\t\t_hdc = default;\n\t}\n\n\tpublic IDisposable MakeCurrent()\n\t{\n\t\tvar glContext = WindowsRenderingNativeMethods.wglGetCurrentContext();","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/AddIns/Uno.WinUI.Graphics3DGL/Windows/WinUINativeOpenGLWrapper.cs#L80-L116","documentation":"WinUINativeOpenGLWrapper.GetProcAddress resolves GL extension function pointers: it tries opengl32.dll's export table via NativeLibrary.TryGetExport, then wglGetProcAddress. If both return IntPtr.Zero it throws InvalidOperationException naming the missing proc. This happens when the GL implementation does not expose the requested extension/function — common on software renderers, older drivers, or when requesting a function the context's version/extensions don't provide.","triggerScenarios":"Silk.NET requests a GL function (an extension entry point) that neither opengl32.dll exports nor wglGetProcAddress can resolve on the current context — because the extension is unsupported on this GPU/driver, or the GL context was not current at load time.","commonSituations":"Loading a GL >=3.0 function on a context that was created as legacy (pre-3.0 pixel format); running on a software renderer (llvmpipe, GDI generic) lacking the extension; querying a function before wglMakeCurrent.","solutions":["Ensure wglMakeCurrent succeeded before loading GL functions, and that the context is a modern (3.3+/4.x) one created with the right pixel format.","Update GPU drivers to a version exposing the required extension.","Make the GL loader tolerant of missing optional extensions and skip features whose procs are zero rather than throw."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!wrapper.TryGetProcAddress(proc, out var addr) || addr == IntPtr.Zero) { /* extension unavailable; skip feature */ }","typeGuard":"static bool GlFunctionAvailable(WinUINativeOpenGLWrapper w, string proc) => w.TryGetProcAddress(proc, out var a) && a != IntPtr.Zero;","tryCatchPattern":null,"preventionTips":["Call wglMakeCurrent before resolving extension entry points.","Create a modern (3.3+) GL context so core extension functions are present.","Make the GL loader tolerant of missing optional extensions."],"tags":["opengl","windows","wgl","extension","native-interop"],"backgroundTag":null,"analyzedSha":"04183404888ea21b4e5bfa3493e8d5f15e972c3a","analyzedAt":"2026-08-13T21:08:11.651Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}