【问题标题】:What happens to OpenGL ES origin on iPhone under device orientation在设备方向下 iPhone 上的 OpenGL ES 原点会发生什么
【发布时间】:2010-10-27 16:52:42
【问题描述】:

我正在尝试通过以下方式与定义其支持的方向的项目交互:

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

我在默认情况下构建了我的程序,我假设它是 UIInterfaceOrientationPortrait。现在的问题是 OpenGL 原点似乎在移动角落。所以我的程序在纵向模式下依赖于左上角的 gl 原点,这是所有应用程序的标准,但现在我认为原点已移动到右上角。

这是真的吗?

【问题讨论】:

    标签: iphone opengl-es


    【解决方案1】:

    好的,所以我找到了答案。现在我知道了,这很明显。 OpenGL 原点是相对于手机感知到的手机左上角的允许方向而固定的。

    【讨论】:

      猜你喜欢
      • 2011-08-22
      • 2012-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多