While you can expect Mac to take ages before OpenGL goes away, this is almost sure to be removed on next iOS version. This means we probably won’t be able to ship anymore for ios in one year.
Are there any plans for integration of the Metal API in MonoGame?
I’m trying to apply this method, but it’s not working properly yet.
HLSL to SPIR-V
SPIR-V to GLSL (or Metal)
Not speaking officially in any way but I understand that support is yet to happen? as it would require yet another huge wrapper to be done, not the candy sort, that wold be too sweet and tasty, not that MonoGame is not sweet and lovely already.
Hopefully someone more in the know [or a GitHub source code crawler] jaunts along sometime soon.
Oh and Welcome to the Forums!
Getting anything to work in Metal is a nightmare, believe me i am porting a game to Metal at the moment and it’s a total nightmare.
AFAIK it is not supported yet, I know I have talked to people about it and it is under consideration, but don’t hold your breath.
And quite frankly, I HATE METAL and hope it is deservedly killed off soon. Apple should just support Vulkan and have done with it.
For iOS and macOS, Vulkan support is possible. Check out: https://github.com/KhronosGroup/MoltenVK
I don’t speak for the MonoGame team, but I know they are aware of the problem because I was part of the online discussion at one time. If you want to know more you can check the GitHub issues such as: https://github.com/MonoGame/MonoGame/issues/4593
Other low level graphic APIs exist for .NET that work with Vulkan/DX12/Metal such as: https://github.com/mellinoe/veldrid and https://github.com/FNA-XNA/FNA.
I’m currently working in my free time to port the following low level C headers of
sokol https://github.com/floooh/sokol to .NET. The C API is already working in .NET on desktop; going to be taking it for a spin soon by building a game and testing it out on mobile.
The only missing piece of information that is not made directly available to public at this point is support for consoles made possible by the MonoGame team with BRUTE. See http://brute.rocks. Last I heard there from Tom on discord is that there is support for Vulkan coming soon? I don’t know.
MonoGame does not support Metal at the moment, but FNA has a Metal graphics backend that is almost ready to ship. So if the hammer comes down on GL support sooner rather than later, you can just use FNA for iOS/macOS/tvOS. In theory it should be a very simple transition, since the vast majority of the API is shared between the frameworks.
That said, it’d be great for MonoGame to adopt Metal too, especially since Apple is likely to force the issue sooner rather than later. If anyone reading this wants Metal support for MonoGame and has an actual budget, please reach out! This is a project I’d be more than happy to work on.
(Side note for those in this thread advocating for a Vulkan backend: IMHO, Metal is actually really nice to work with and leagues better than Vulkan in terms of API design. The MetalDevice I linked above has ~6k LoC and can run complex games like Celeste and FEZ. I tried writing a VulkanDevice and gave up after writing 7k LoC that still couldn’t even clear the screen. It’s not an exaggeration to say there’s an order of magnitude difference in complexity between the APIs. That said, if Tom & co. can pull off a Vulkan backend, more power to 'em!)
Wish someone could shed some light on how one might contribute to add DX12+ to MG, if I could learn it, could assist possibly…
Remember, Scorpion II is out soon and Surface NEO and DUO will be Vulkan based ironically… as far as I know unless Microsoft got DX working on Linux?
Sorry to derail
GLSL, GLSL ES, and MSL can be exported from SPIR-V. Vulkan can use SPIR-V as it is.
First, implement only the part that comvert HLSL to SPIR-V and SPIR-V to GLSL. In this case, MonoGame itself can use the existing code as it is. Only the Content Pipeline needs to be improved.
Understatement of the century, not that I mean to discourage new users, it works, but has much room for improvement…
Unfortunately, I am unable - at this time - to help, despite having that viewpoint.