Does openGL ES have a better performance than Core Animation and UIKit when it comes to highly animated user interfaces?

后端 未结 3 803
时光说笑
时光说笑 2021-02-06 08:53

Currently I have an user interface that makes incredible heavy use of core animation. I wonder if it is worth to spent another 2 months for learning openGL ES? Does that really

3条回答
  •  死守一世寂寞
    2021-02-06 09:37

    It depends on what you are doing and what device you are targeting. If you are doing things that would benefit from a programmable graphics pipeline and targeting the iPhone 3GS then you might be able to see some benefit, simply because that functionality is not exposed through CoreAnimation so you have to do it in sort of weird ways (manipulating images, etc). The iPhone 3G hardware doesn't have programmable shaders, so even if your effects can be expressed in terms of shaders moving to OpenGL will not provide that benefit on older phones.

    If all you are doing is moving, rotating, and scaling 2D surfaces then CoreAnimation is going to give very similiar performance to OpenGL, slightly better or worse depending on how your data is getting into the layers, etc.

提交回复
热议问题