【发布时间】:2011-09-05 09:44:28
【问题描述】:
试图让Cocos2D 和openFrameworks 在iOS 上一起玩得很好。两者都想使用GL / EAGLview,当然他们不能同时使用glView = [[EAGLView alloc] init],因为你不能有两个根视图。一个必须init 而另一个需要将其glView 指针分配给另一个。我现在在做什么:
#ifdef __COCOS2D__
glView = [[CCDirector sharedDirector] openGLView];
#else // this is the standard openFrameworks GL init code
glView = [[EAGLView alloc] initWithFrame:screenBounds andDepth:iPhoneGetOFWindow()->isDepthEnabled() andAA:iPhoneGetOFWindow()->isAntiAliasingEnabled() andNumSamples:iPhoneGetOFWindow()->getAntiAliasingSampleCount() andRetina:iPhoneGetOFWindow()->isRetinaSupported()];
如果我#define __COCOS2D__,它会给我一个黑屏。
我在哪里可以了解我需要了解的有关 EAGLView 的知识,以便以一种让 Cocos2D 和 openFrameworks 都满意的方式 init 它?
或者,如果您感觉特别神圣:为什么会出现黑屏,我该怎么办?
【问题讨论】:
标签: ios cocos2d-iphone openframeworks eaglview