且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我应该学习什么:Quartz或OpenGL ES?

更新时间:2023-09-23 21:03:34

通过Quartz,你可能意味着核心动画。 Quartz只是Mac / iPhone 2-D绘图API,其中Core Animation处理视图和图层的动画。

By Quartz, you probably mean Core Animation. Quartz is simply the Mac / iPhone 2-D drawing API, where Core Animation handles animation of views and layers.

使用OpenGL执行自定义动画非常困难视图,但核心动画是为此目的而设计的。我向人们推荐,如果他们考虑做二维动画,即使在游戏中,他们也应该首先看看Core Animation并且只有在Core Animation的表现不可接受的情况下才能进入OpenGL ES。 Core Animation让你只需要一些代码即可完成很多工作,现在有很多关于这个主题的很好的参考资料(例如Marcus Zarra和Matt Long的新书)。

It is very difficult to use OpenGL for performing custom animations on views, but Core Animation is designed for this purpose. It has been my recommendation to people that if they are thinking about doing 2-D animations, even in games, they should look at Core Animation first and go to OpenGL ES only if Core Animation's performance is unacceptable. Core Animation lets you do a lot with just a little code, and there are now plenty of great references out there on the topic (such as Marcus Zarra and Matt Long's new book).

您可能希望更多地参考其他一些问题:

You may wish to refer to some of these other questions for more:

  • iPhone board game: OpenGL ES or CoreGraphics?
  • Core Animation or OpenGL for simple iPhone game
  • Quartz 2D vs OpenGL ES Learning Curve