Awesome, this is amazing news! A massive thanks to everyone on the MonoGame team and everyone else involved to make this happen.
I really appreciate the > 255 shader fix(this will help a lot), so many nice updates and fixes. Can’t wait till you Guys add PS5 and Xbox Series X support down the road.
Again all the best and thanks for the continued support and all your hard work!
I have a library that makes it easy to use Dear ImGui in an MVVM way (https://github.com/KallDrexx/ImGuiHandler). One of benefits of this is I have a ImguiHandler.Monogame project which has all the connective pieces to hook Dear ImGui up with Monogame. In order to do that though my .net standard 2.0 library needs access to MonoGame, so I can access Texture2d, SamplerState, and other MG specific data structures.
Right now I have my MG library flagged as preview because it links directly against DesktopGL, which works fine for my very specific purposes.
However, I don’t understand how I’m supposed to allow my library to be renderer/backend agnostic. For example, what happens if someone wants to use this library in an IOS, Android, or UWP product? I assume it won’t work since the library is linked to Monogame.Framework.DesktopGL while the actual game is linked to MonoGame.Framework.Ios. Am I wrong about that?
It seems like MonoGame.Framework.Portable was meant to address that, but that nuget package wasn’t upgraded to 3.8.
Am I missing something about how to generalize this nuget project?
If you take a look at the .NET Standard library template, you’ll see it references DesktopGL with <PrivateAssets>All</PrivateAssets>. This is the key to the bait-and-switch method. Although your library references the DesktopGL package, it won’t link with it in a downstream application. When this library is used in a game referencing the iOS package, it will be linked to that one instead.
As long your library doesn’t use any APIs that are specific to DesktopGL (which aren’t too common), then this essentially functions the same as the old Portable package.
I mentioned this to @harry-cpp , but this sort of thing should be in the docs somewhere and maybe even in the 3.7 migration doc. It is going to come up a bunch.
Thanks, I had no idea of that feature in csproj/nuget declarations. Since I use Rider and not Visual Studio I hadn’t even attempted to look at the .net standard template.