Closed esthermations closed 8 months ago
The example code here should be included as a static library in a XCode Project. I've done that way since XCode is the main way to develop a project on macos. Doing a main
function would bring some extra complications here like the necessity of needing to deal with some system linker stuff + code signing.
So, for testing, what I would recommend is simply creating a metal sample app from xcode and then importing the static library created from the example.
What changes would be needed to make this usable outside of xcode, I intend to make a metal port of Inochi2D which will be used with the macOS version of Inochi Creator, there a standalone D app is neccesary.
Also code signing in this regard is up to the publisher of the app that uses the binding, not you.
What changes would be needed to make this usable outside of xcode, I intend to make a metal port of Inochi2D which will be used with the macOS version of Inochi Creator, there a standalone D app is neccesary.
Also code signing in this regard is up to the publisher of the app that uses the binding, not you.
The bindings has nothing related to the executable production. This only happens because it is lacking the initial NSApp setup inside the examples. The bindings are good-to-go. You only need to be sure to link to metal.framework and objc.framework
@LunaTheFoxgirl Also, if you need, you can ping me on the D discord that I can help you, my nick is @hipreme
What changes would be needed to make this usable outside of xcode, I intend to make a metal port of Inochi2D which will be used with the macOS version of Inochi Creator, there a standalone D app is neccesary. Also code signing in this regard is up to the publisher of the app that uses the binding, not you.
The bindings has nothing related to the executable production. This only happens because it is lacking the initial NSApp setup inside the examples. The bindings are good-to-go. You only need to be sure to link to metal.framework and objc.framework
Ohh I see, I misinterpreted your reply, sorry.
Although it does compile and produces a static binary, I'm not really sure how to use the hello_triangle example, or what the
main()
function I need to write to use it would look like. I've written the equivalent in Objective-C, but that uses NSApplication, NSWindow etc which aren't included in this binding. Can this be documented or added to the examples?Thank you!
You can now compile the sdl-example instead, this example works on my M3 Max powered device.
Although it does compile and produces a static binary, I'm not really sure how to use the hello_triangle example, or what the
main()
function I need to write to use it would look like. I've written the equivalent in Objective-C, but that uses NSApplication, NSWindow etc which aren't included in this binding. Can this be documented or added to the examples?Thank you!