Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should I learn: Quartz or OpenGL ES? [closed]

I'm learning to program for the iPhone. I'm trying to figure out how to do some really cool custom view animations. What should I learn, Quartz or OpenGL ES?

For whoever says OpenGL ES, could I use it to animate my views or is only Quartz suitable for the task? Thanks.

Also any resources / the book or anything that teaches you this stuff in the most painless manner?

like image 943
Anthony Glyadchenko Avatar asked Feb 24 '10 18:02

Anthony Glyadchenko


2 Answers

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.

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
like image 178
Brad Larson Avatar answered Sep 18 '22 23:09

Brad Larson


You can actually animate views without even going into Quartz. There's a lot you can do with UIKit. Apple's documentation recommends:

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

like image 45
bpapa Avatar answered Sep 19 '22 23:09

bpapa