开发者

OpenGL ES on Iphone: simple 2D animation (interpolation/tween)

I'm working on an app that basically revolves around 2D shapes (mostly simple polygons) being dynamically drawn and animated.

I'm looking for a way to easily time my animations. It's basically just moving a vertex to a specified point in a开发者_运维技巧 specified time, so just interpolating floats, with all the usual easing parameters. I come from a Flash/ActionScript 3 environment, so if you're familiar with that, think Tween Classes.

I probably could easily be doing this with Core Animation (BasicAnimation etc), but i will have up to a hundred gradient-filled shapes with varying opacity being animated dynamically, and I need good performance (60fps would be great). So i went for OpenGL ES. Plus I'm totally for investing time into learning something that I'll be able to reuse cross-platform.

So I know OpenGL is only for graphic rendering, and I'm not going to find any 2D animation methods built in. And I heard using CA with OpenGL (if feasible) was not a good idea performance-wise. But before I look deeper into interpolation algorithms to increment my vertex's coordinates every frame, I juste wanted to make sure I wasn't totally missing out on something much easier!?

Thanks!


I would look into the popular cocos2d library. It looks really nice; supports animation and uses OpenGL ES behind the scenes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜