bastos80
Topic Author
Posts: 4
Joined: 13 Oct 2019, 14:19

Problems on macOS Catalina + Xamarin.Mac

13 Oct 2019, 16:45

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?
 
bastos80
Topic Author
Posts: 4
Joined: 13 Oct 2019, 14:19

Re: Problems on macOS Catalina + Xamarin.Mac

14 Oct 2019, 11:21

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
 
bastos80
Topic Author
Posts: 4
Joined: 13 Oct 2019, 14:19

Re: Problems on macOS Catalina + Xamarin.Mac

14 Oct 2019, 11:37

Ok, I managed to get Metal to work by changing the following in the RenderContextMTL class:

I changed
((NSView)Runtime.GetNSObject(window)).Layer.AddSublayer(_layer);
to
((NSView)Runtime.GetNSObject(window)).Layer = _layer;
And added
mTLTextureDescriptor.StorageMode = MTLStorageMode.Private;
to the Resize () method.
 
User avatar
hcpizzi
Site Admin
Posts: 229
Joined: 09 Feb 2012, 12:40

Re: Problems on macOS Catalina + Xamarin.Mac

16 Oct 2019, 12:39

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.

Who is online

Users browsing this forum: No registered users and 7 guests