用Metaio for IOS 开发AR应用 第一招
Preface :闲来无事写个Metaio的教程玩玩、望对他人有所帮助、别无它求、一起学习交流,共同进步,QQ:4656587
首次发帖、不喜误入、绝对原创
一 、 欲练此功,必先下载SDK,否则难成
下载地址:点击此下载
二、运行Demo玩玩
二、运行Demo玩玩
本帖隐藏的内容
三、新建项目
先用最简单的吧 Empty Application

四、引入类库
图片所示类库都不能少
图片所示类库都不能少

五、导入很重要的2个类

到这里编译应该还会报很多错误,,,
请做以下修改

六、建立我们的ViewController ,设置为UIwindow 的rootViewController

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. MainViewController *main=[[MainViewController alloc]initWithNibName:@"MainViewController" bundle:nil]; self.window.rootViewController=main; [main release]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; }
七、修改后缀为XXX.mm
八、到这里在我们的MainviewController 上添加一个view 设置其类型为 EAGLView(看图)
连接File‘s Owner 的glview 到我们的自己这个view

九、到这里编译应该程序会崩溃
我们打开MetaioSDKViewController.mm 看到如下代码
我们打开MetaioSDKViewController.mm 看到如下代码
// Define your License here // for more information, please visit http://dev.metaio.com #define SDK_LICENSE "EHte41vghj7x6vG98m0pvS6IlDLMvk5dZKkEoMNnAZU=" #if !defined (SDK_LICENSE) #error Please provide the license string for your application #endif
这里的 SDK_LICENSE 是我们现在需要得到的 ,
接下来我们登录 http://dev.metaio.com 点击SDK 看右边的Get Developer Key,点击登录metiao
点击登录
看图提示添加个一条信息,在下面的Signature 就是我们需要的 SDK_LICENSE
现在我们重新编译,就不会崩溃了
十、现在运行程序我们的,可爱的摄像机出来来。。。。
现在我们重新编译,就不会崩溃了
十、现在运行程序我们的,可爱的摄像机出来来。。。。

====================================
发一篇文章还真难。。。。
发一篇文章还真难。。。。