当我旋转 iPad 时,OpenGL 视图的变换矩阵会重置
为了在 iPad 上采用我的游戏,我使用 CGAffineTransformScale 放大了我的 openGL 视图。一切正常,但当我旋转设备时,变换矩阵会重置,并且我得到未缩放的 openGL 视图,该视图仅占屏幕的 1/4。我发现当调用 EAGLView layoutSubviews 时会发生这种情况。有谁知道如何解决这个问题? 谢谢!
In order to adopt my game for iPad, I've scaled up my openGL view using CGAffineTransformScale. Everything works fine, but when I rotate the device, the transformation matrix is resetting and I get unscaled openGL view which takes only 1/4 of the screen. I found out that this happens when EAGLView layoutSubviews is called. Does anyone know how to solve this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将
CGAffineTransformScale
代码插入 EAGLViewlayoutSubviews
方法。Insert your
CGAffineTransformScale
code into EAGLViewlayoutSubviews
method.