Post

Replies

Boosts

Views

Activity

Swift package setup for a metal renderer
Hey everyone, I have been working on a Metal Renderer and I would like to set this up as a Swift Package. However I am running into some issues with setting up the package and I have not been able to find a solution, so I thought I'd give it a shot here. To keep it simple, in my project I have a .swift file doing the rendering, a .metal file that contains my shader code and a .h file (which is a bridging header in my project) which contains stuff like Types to be shared between the metal shaders and the swift code. I am stuck of how I can include the .h and .metal files in the swift package. Right now the swift file doesn't pick up on the stuff inside the header file and the metal file is just loaded with errors as if it doesn't recognize the file type. Ideally I would also like to expose this header to the outside. Has anyone ever done something like this, or know if this is even possible? Thanks in advance, and kind regards
2
0
1.4k
Sep ’20