Marrying Core Animation with OpenGL ES

非 Y 不嫁゛ 提交于 2019-12-02 19:36:12

Have you tried making a parent layer above the OpenGL layer and animating that instead?

Jeff Argast

You can override display instead of drawInContext. During the animation, the animated value is in the presentation layer.

- (void) display
{
    GLLayer* myPresentationLayer = (GLLayer*)[self presentationLayer];
    self.renderer.centerPoint = myPresentationLayer.sceneCenterPoint;
    [self.renderer render];
}

At the end the presentation layer will have the model layer value, so you’ll need to set the final value on the model layer before starting the animation.

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