Sorry if it’s a really dumb question but I was trying to figure out how to initialise SDL with Metal support for MacOS. I already have my game working with OpenGL, I create an SDL window and GLContext and do my own render calls, I want to be able to just initialise SDL to use Metal.
I imagine you could do it by getting the NSWindow (macOS) or UIWindow (iOS) pointer from SDL via SDL_GetWindowWMinfo(), and then create your own NSView or UIView inside it for use with Metal, and then bootstrap Metal yourself from there.
I imagine you could do it by getting the NSWindow (macOS) or UIWindow
(iOS) pointer from SDL via SDL_GetWindowWMinfo(), and then create your
own NSView or UIView inside it for use with Metal, and then bootstrap
Metal yourself from there.
We don’t expose this in a public API, but I think you can duplicate
what our Metal code for the 2D render API does to set this up: