Search code examples
iosxcode6metal

Compiling and running the metal examples


It has been a while since I have used XCode, but since Apple revieled XCode 6 and the new Metal API I had to check it out.

They have released examples, e.g. a converted version of their Basic3D example. I am having problems making them compile and run, though. I had to add paths the Quatz and Metal frameworks for compilation and linking to work - thought that should have worked out of the box with build-in libraries?

Also the metal shader compilation step fails, it can not find the metal compiler. Where in XCode is that path setup?

If I ignore the shader compilation step I get an error that the application will not run on any of the simulators. Can metal based 3D applications only run on actual hardware and not in simulator mode?


Solution

  • You can't run metal on simulator but you can use this workaround so that it will still compile as long as you have a fallback for the code.

    http://medium.com/@jscampbell/bare-metal-working-with-metal-and-the-simulator-70e085e3a45