core-foundation-rs
core-foundation-rs copied to clipboard
Support for CAMetalLayer in NSView?
I'm trying to figure out if setLayer as it is in AppKit supports setting a CAMetalLayer for an NSView.
The example I'm following is as follows: https://github.com/KhronosGroup/MoltenVK/issues/78
I'm trying to get this to work to get MoltenVK working without resorting to writing ObjectiveC.
I believe this should work.
Thanks for the response.
The approach described in the link I provided seems to instantiate a CAMetalLayer, but the setLayer method in AppKit.rs takes in an integer as a parameter. It doesn't help that the official Apple documents don't seem to document the setLayer method: https://developer.apple.com/documentation/uikit/uiview/1622436-layer
Do you have any suggestions as to how to approach it from this end? Should there be defined constants to be used in this API?