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.
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.
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
I’m currently working in my free time to port the following low level C headers of sokolhttps://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!)
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.