... frustration I want my game to be played only in landscape mode. I added the appropriate key / value to the Info.plist file which forces the device to be oriented on the launch.
Now I am trying to rotate the OpenGL coordinate space to match the device. I'm trying to use the code that I found, but it's not working. My test pulls a square in the case center, and with that code all , do not let me Not seen; If I comment on 2 parts (only the installation of GL_PROJECTION matrix mode), then the coordinate system does looks correct. But I would like it to be a little amazement about how to do this, as well as setting up a visual nibb. Tips, please?
In addition, in the future, I am going to swap EAGLView with another UIView subclass; Is it going to require something different?
Thank you! Randy
You have the plist set correctly, now make sure that all your view controllers have the following :
- (BOOL) should use the OTRTTTO interface (UIInterfaceOrientation) toInterfaceOrientation {return (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)? No; }
Without it, the scenes of a child can mess up.
In addition, if you have a UIA controller or similar, then it needs a sub-class and should implement itAurototettoInterfaceArrayation because its dead stupid default for your own and portraiture and wasting things Will give
Then for viewdidload
- (zero) viewDidoadload {[Super Viewedloadload]; CGRCT rect = [[USScreen main screen] border]; Rect.size.height = 320; Rect.size.width = 480; Rect.origin.x = 0; Rect.origin.y = 0; GlView = [[EAGLView alloc] initWithFrame: REX pixel format: GL_RGB 565_OS depth format: GL_DEPT_ COMPONENT16_OES protected backbuffer: no]; [Self.view addSubview: glView]; [GlView addSubview: minimapView]; // etc ...}
No comments:
Post a Comment