0

我可以增加 EAGLView 的框架吗(我将 CGRectMake(0,0,320*3,480*3) 设置在 1024 以上,如果我将框架设置在 1024 以上,它在 iOS 4.2 中可以正常工作,但在 iOS 4.1 设备中,如果我将框架设置在 1024 以上,它就不起作用.

DO i need to add any extra code for 4.1? 
Why the textures are not displaying in IOS 4.1 devices if i set the frame of EAGLView above 1024?

更新:我创建了一个示例 openGL 项目,并用以下代码替换了 didFinishLaunchingWithOptions ......它在模拟器中运行良好,但在< IOS 4.2 的设备上没有显示任何内容。

#define VIEWSIZEFACTOR 3 // our EAGLView nees to be multiple of 320X480 to maintain aspect ratio.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    CGRect rect = [[UIScreen mainScreen] bounds];
    [self.viewController.view setFrame:CGRectMake(-500, -500, rect.size.width*VIEWSIZEFACTOR, rect.size.height*VIEWSIZEFACTOR)]; //CHANGESIZE

    [self.window addSubview:self.viewController.view];
    return YES;
}
4

1 回答 1

2

会不会是 iOS 4.2 设备比 iOS 4.1 设备更新?更现代的设备(iPhone 3GS 和 4、iPad、更新的 iPod Touch)使用更高级的 GPU,它支持 OpenGL ES2.0 管道和更大的纹理 (2048x2048)。

于 2010-12-01T07:01:23.970 回答