Yosemite中的Xcode 6 iOS SDK 8.0给出了OpenGL ES2代码的错误,它在Xcode 5下编译得很好
GLuint depthStencilRenderbuffer;
glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthStencilRenderbuffer);
glRenderbufferStorageOES(GL_RENDERBUFFER_OES,
GL_DEPTH24_STENCIL8_OES,
self.view.bounds.size.width,
self.view.bounds.size.height);
Run Code Online (Sandbox Code Playgroud)
生成错误:
第2行:
"glBindRenderBufferOES"的冲突类型
使用未声明的标识符'GL_RENDERBUFFER_OES'
第3行:
包含'glBindRenderBufferOES'的隐式声明在C99中无效
编辑:好的,我可以通过替换来重新开始工作:
GLuint depthStencilRenderbuffer;
glBindRenderbuffer(GL_RENDERBUFFER, depthStencilRenderbuffer);
glRenderbufferStorage(GL_RENDERBUFFER,
GL_STENCIL_INDEX8,
self.view.bounds.size.width,
self.view.bounds.size.height);
Run Code Online (Sandbox Code Playgroud)
仍然 - 我不知道为什么需要这种改变,我很欣赏一些关于这里发生了什么的进一步见解.
在iOS8上,我正在使用UIActivityViewController与Facebook/Twitter等共享UIImage.它似乎工作正常,但今天它在我的iPad上运行代码时突然崩溃了.但是,它仍然可以在模拟器中按预期工作.
我的代码:
UIActivityViewController *controller =
[[UIActivityViewController alloc]
initWithActivityItems:@[text, url, myImage]
applicationActivities:nil];
[self presentViewController:controller animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
崩溃后,Xcode吐出:
发现的扩展名:{({id = com.apple.share.Facebook.post},{id = com.apple.share.Twitter.post},{id = com.apple.share.TencentWeibo.post},{id = com.apple.share.SinaWeibo.post})} for attributes:{NSExtensionActivationRule = {extensionItems =({attachments =({registeredTypeIdentifiers =("public.image");},{registeredTypeIdentifiers =("public.plain-text" );},{registeredTypeIdentifiers =("public.url");});}); }; NSExtensionPointName =("com.apple.share-services","com.apple.ui-services","com.apple.services"); 2014-08-07 21:38:59.208 collageTest [279:11021] LaunchServices:invalidationHandler被称为2014-08-07 21:38:59.212 collageTest [279:11016]发现的扩展:{({id = com.apple.share .Flickr.post},{id = com.apple.mobileslideshow.StreamShareService},{id = com.apple.share.Twitter.post},{id = com.apple.share.Facebook.post},{id = com .apple.share.Vimeo.post},{id = com.apple.share.SinaWeibo.post},{id = com.apple.share.TencentWeibo.post})} for attributes:{NSExtensionPointName ="com.apple.共享服务"; 2014-08-07 21:38:59.216 collageTest [279:11021] LaunchServices:invalidationHandler被调用