代码之家  ›  专栏  ›  技术社区  ›  twerdster

在面向设备的iPhone上OpenGL ES origin会发生什么

  •  1
  • twerdster  · 技术社区  · 14 年前

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

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

    是真的吗?

    1 回复  |  直到 14 年前
        1
  •  0
  •   twerdster    14 年前

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