glViewport different result in Android and iOS

主宰稳场 提交于 2019-12-05 23:17:40

Answering my own question for those who have the same issue.

I use GLKView which apparently calls the glViewport on each render call, resetting what I just did in the previous frame. So if you use GLKView make sure to call glViewport each frame! ... or roll your own EAGLView to have some real control which I think, I am about to.

This looks like you are not accounting for the scale factor of the iOS device. Bear in mind that the most recent iOS devices have retina displays with an extremely high ppi. You can see this artifact in the bottom left of the iOS screenshot. It is only displaying the bottom 25% of your texture because the entire view has a scale factor of 2.

In short, ensure you account for the scaleFactor on iOS and use this factor in your glScalef call.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!