What should I know: Quartz or OpenGL ES?

I am learning to program for the iPhone. I'm trying to figure out how to make some really cool custom viewing animations. What should I find out, Quartz or OpenGL ES?

For those who say OpenGL ES, can I use it to animate my views or just for quartz suitable for this task? Thanks.

Also any resources / book or anything that teaches you these things in the most painless way?

+6
iphone sdk opengl-es quartz-graphics
source share
4 answers

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

It is very difficult to use OpenGL to perform custom animations in views, but Core Animation is designed for this purpose. My recommendation for people was that if they are thinking about making two-dimensional animations, even in games, they should first look at Core Animation and go to OpenGL ES only if the performance of Core Animation is unacceptable. Core Animation lets you do a lot with just a little code, and there are now many great links to this topic (like Marcus Zarra and Matt Long's new book ).

You can refer to some of these other questions for more information:

  • Board Game for iPhone: OpenGL ES or CoreGraphics?
  • Core Animation or OpenGL for a simple iPhone game
  • Quartz 2D vs OpenGL ES Curve Curve
+9
source share

You can really animate views without even having to go into Quartz. You can do a lot with UIKit. Apple Documentation recommends:

In general, you should use the highest level structure that meets the requirements of your application. Use lower-level frameworks only when you need more precise control or more powerful features.

+2
source share

If you want to animate your views, start with Core Animation. He can do a lot for you. If after trying you canโ€™t get the effect you want only in CoreAnimation, use it with Quartz. If this still doesn't fit your specific need, then just explore OpenGL.

0
source share

If you want to animate the movement of views around the screen, then the main animation is what you want.

If you want to run custom animation inside a view, you should use OpenGLES for maximum performance.

You can do both at once.

0
source share

All Articles