Difference between glkView:drawInRect: and glkViewControllerUpdate:? OpenGL ES 2 - iOS

我只是一个虾纸丫 提交于 2019-12-05 12:21:39

In the first instance, Apple are trying to help you decouple timing from frame rate. If your game always manages to draw a frame in the time allotted for a single frame, the two will occur in lockstep. But even if lots of objects come on screen and your frame rate sags a little, you'll still get the same number of updates a second so objects will still move at the same speed.

In the second, they're helping you keep your code divided as model-view-controller. How your objects are presented should be decoupled from how they act.

So your update should progress whatever it is that causes your animation, your draw should present the current state.

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