Post

Replies

Boosts

Views

Activity

MetalKit's drawInMTKView function not called if app is built using cmake/make?
I ran into a strange issue testing Metal cpp. The following project is almost the same as Apple's official Metal Cpp example project (https://developer.apple.com/videos/play/wwdc2022/10160/). https://github.com/shi-yan/testmetal The apple official example contains an Xcode project, whereas my modified version tries to use cmake. My cmake project builds and runs, but the window is empty. I debugged it, the root cause is that the drawInMTKView function never gets called. If I generate an Xcode project using cmake, then build and run my code in Xcode, the resulting app can render to its window just fine. However, if I run the same app binary through the terminal, it will show an empty window again. Any idea what might cause this? Thanks.
1
0
1.1k
Aug ’22
MetalKit's drawInMTKView function not called if app is built using cmake/make?
I ran into a strange issue testing Metal cpp. The following project is almost the same as Apple's official Metal Cpp example project (https://developer.apple.com/videos/play/wwdc2022/10160/). https://github.com/shi-yan/testmetal The apple official example contains an Xcode project, whereas my modified version tries to use cmake. My cmake project builds and runs, but the window is empty. I debugged it, the root cause is that the drawInMTKView function never gets called. If I generate an Xcode project using cmake, then build and run my code in Xcode, the resulting app can render to its window just fine. However, if I run the same app binary through the terminal, it will show an empty window again. Any idea what might cause this? Thanks.
Replies
1
Boosts
0
Views
1.1k
Activity
Aug ’22