当我旋转 iPad 时,OpenGL 视图的变换矩阵会重置

发布于 2024-12-27 08:29:11 字数 179 浏览 3 评论 0原文

为了在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魔法少女 2025-01-03 08:29:11

CGAffineTransformScale 代码插入 EAGLView layoutSubviews 方法。

Insert your CGAffineTransformScale code into EAGLView layoutSubviews method.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文