Problems on macOS Catalina + Xamarin.Mac
Okay, so I'm having a few issues getting Noesis GUI to work on my macOS Catalina setup.
First off, the Metal render context does not seem to work, forcing me te revert to RenderContextNSGL.
Using RenderContextMTL results in a NullReferenceException in NoesisApp.RenderContextMTL.Init(...) at startup.
Secondly, when I do use RenderContextNSGL, there are scaling issues, it uses only lower left 1/4th of the screen, the rest remains black. It does show the whole image, just scaled down. This also causes a mismatch with the mouse input coordinates.
To test this, I just ran a couple of the supplied C# examples.
Also, I still have to patch Xamarin.Mac back to version 5.8, the latest version gives a type initialization exception at startup (viewtopic.php?f=3&t=1819&p=10328&hilit=macos#p10328)
Is there anything I can do to fix this or are these bugs in Noesis GUI?
First off, the Metal render context does not seem to work, forcing me te revert to RenderContextNSGL.
Using RenderContextMTL results in a NullReferenceException in NoesisApp.RenderContextMTL.Init(...) at startup.
Secondly, when I do use RenderContextNSGL, there are scaling issues, it uses only lower left 1/4th of the screen, the rest remains black. It does show the whole image, just scaled down. This also causes a mismatch with the mouse input coordinates.
To test this, I just ran a couple of the supplied C# examples.
Also, I still have to patch Xamarin.Mac back to version 5.8, the latest version gives a type initialization exception at startup (viewtopic.php?f=3&t=1819&p=10328&hilit=macos#p10328)
Is there anything I can do to fix this or are these bugs in Noesis GUI?
Re: Problems on macOS Catalina + Xamarin.Mac
Some more digging into the Metal render context reveals the exception occurs in the following line:
((NSView)Runtime.GetNSObject(window)).Layer.AddSublayer(_layer);
Where, apparently, ((NSView)Runtime.GetNSObject(window)).Layer is null
((NSView)Runtime.GetNSObject(window)).Layer.AddSublayer(_layer);
Where, apparently, ((NSView)Runtime.GetNSObject(window)).Layer is null
Re: Problems on macOS Catalina + Xamarin.Mac
Ok, I managed to get Metal to work by changing the following in the RenderContextMTL class:
I changed
to
And added
to the Resize () method.
I changed
Code: Select all
((NSView)Runtime.GetNSObject(window)).Layer.AddSublayer(_layer);Code: Select all
((NSView)Runtime.GetNSObject(window)).Layer = _layer;Code: Select all
mTLTextureDescriptor.StorageMode = MTLStorageMode.Private;Re: Problems on macOS Catalina + Xamarin.Mac
Hi bastos80,
Thank you for digging into this issue. We're taking a look at your changes and we'll integrate them into our next release.
Thank you for digging into this issue. We're taking a look at your changes and we'll integrate them into our next release.
Who is online
Users browsing this forum: Google [Bot] and 5 guests