开发者

What happens to OpenGL ES origin on iPhone under device orientation

开发者 https://www.devze.com 2023-01-22 10:11 出处:网络
Im trying to in开发者_如何转开发terface with a project which defines its supported orientation by:

Im trying to in开发者_如何转开发terface with a project which defines its supported orientation by:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
 //making sure that the tour is displayed in landscape
 return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

I built my program under the default which i assume to be UIInterfaceOrientationPortrait. The problem now is that it appears that the OpenGL origin is moving corners. So my program depends on the gl origin to be top left when in portrait mode which is standard across all applications but now i think the origin has moved to become the top right corner.

Is that true?


Okay, so I found out the answer. Its pretty obvious now that I know. The OpenGL origin is fixed with respect to what the phone perceives is the top left corner of the phone for the allowable orientations.

0

精彩评论

暂无评论...
验证码 换一张
取 消