why are you passing both IWindow and GLFW?
why are you passing both IWindow and GLFW?
GL object also has a getprocaddress
return procAddress break-point multiple times, but the app crashes before I hit the if statementif right after the Create call glGetString twice for some reasonexit(0) somewherestrace thispmap confirms that they belong to /lib64/libGLdispatch.so.0.0.0 that seems to export glGetString. Dealing with native stuff can be so frustrating glm in silk.net?GlfwWindowing.RegisterPlatform(); in my code to support NativeAOT

WinExe (which during development i really do not recommend) you will get an errorGLvar grGlInterface = GRGlInterface.Create((name) => {
if (!window.GLContext.TryGetProcAddress(name, out var procAddress)) {
throw new InvalidOperationException("Could not get a proc address for " + name);
}
return procAddress;
});
if (grGlInterface == null) {
throw new InvalidOperationException("Could not create a GLFW GRGL context");
}return procAddressififCreate2
Returning address 140000246277600 for proc glGetString
Returning address 140000246277632 for proc glGetStringi
Returning address 140000246271008 for proc glGetIntegerv
Returning address 140000246345920 for proc eglQueryString
Returning address 140000246345952 for proc eglGetCurrentDisplayglGetStringglGetStringvar grGlInterface = GRGlInterface.Create((name) => {
if (!window.GLContext.TryGetProcAddress(name, out var procAddress)) {
procAddress = IntPtr.Zero;
}
Console.WriteLine($"Returning address {procAddress} for proc {name}");
return procAddress;
});exit(0)strace┏[machinarius][broken_silkdotnet] ≡ ?1 ~1
┖[~/Projects/DoomThing]> dotnet run
Returning address 139470428931552 for proc glGetString
Returning address 139470428931552 for proc glGetString
Returning address 139470428931584 for proc glGetStringi
Returning address 139470428924960 for proc glGetIntegerv
Returning address 139470428999872 for proc eglQueryString
Returning address 139470428999904 for proc eglGetCurrentDisplay
┏[machinarius][broken_silkdotnet] ≡ ?1 ~1
┖[~/Projects/DoomThing]> echo $?
139pmap/lib64/libGLdispatch.so.0.0.0glmGlfwWindowing.RegisterPlatform();WinExe