Skip to content

Support for CAMetalLayer in NSView? #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tracked by #719
hobogenized opened this issue Jul 3, 2018 · 2 comments
Open
Tracked by #719

Support for CAMetalLayer in NSView? #222

hobogenized opened this issue Jul 3, 2018 · 2 comments

Comments

@hobogenized
Copy link

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: KhronosGroup/MoltenVK#78

I'm trying to get this to work to get MoltenVK working without resorting to writing ObjectiveC.

@jrmuizel
Copy link
Collaborator

jrmuizel commented Jul 6, 2018

I believe this should work.

@hobogenized
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants