编译并运行金属示例 [英] Compiling and running the metal examples

查看:146
本文介绍了编译并运行金属示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我使用XCode已经有一段时间了,但是由于Apple取消了XCode 6和新的Metal API,我不得不检查它。

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.

他们已经发布了例子,例如他们的Basic3D示例的转换版本。但是,我在编译和运行时遇到问题。我不得不添加Quatz和Metal框架的路径以进行编译和链接工作 - 认为本应该开箱即用的内置库?

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?

也是金属着色器编译步骤失败,它找不到金属编译器。 XCode中的路径设置在哪里?

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

如果我忽略着色器编译步骤,我会收到一个错误,即应用程序无法在任何模拟器上运行。基于金属的3D应用程序只能在实际硬件上运行而不能在模拟器模式下运行吗?

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?

推荐答案

你不能在模拟器上运行金属但是你可以使用这种解决方法,只要你有代码的后备,它仍然可以编译。

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

这篇关于编译并运行金属示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆