PDA

View Full Version : OpenGL ES vs Quartz 2D



gluser_new
01-08-2011, 04:16 PM
Hello OpenGL Community!

I am a noob 2D iPhone game developer and would like to use graphics in my application. So I found two typs of APIs, OpenGL ES and Quartz 2D. I don't know much about OpenGL ES but I read many OpenGL ES tutorials and try to understand that graphic library. In addition to this i found another framework called Quartz 2D.

I used google to search for a short overview about that two frameworks. I could only find some points that make the frameworks unique.

Quartz 2D:
I wrote that apple overview about Quartz 2D and I think that it is only used to create simple graphics with easy command.

OpenGL ES:
I found many tutotials and wiki articles about that topic. There are some reasons to use that framework in 2D applications. One reason is that is very useful for more detailed graphics. Many commands with many arguments for more attitude -> better graphics. Also it used many triangles - so you can create every kind of graphic! Another point is that is is also used for 3D games and that is very famous. It gets every month new features and more! This features can be used for 2D games too --> great updates. OpenGL ES can create graphics very fast (with very complex 2D transformations) - faster than Quartz 2D - and still is up to 100fps!

So thats the facts I found out. Can you tell me more facts or advantage/disadvantage (relative to 2D applications)? I am not sure that Quartz 2D is so "crap" and bad according to OpenGL ES.

Please help me to find out - whats the best for my 2D application. Please excuse my bad english

Best Regards,
gluser_new

ZbuffeR
01-08-2011, 04:45 PM
whats the best for my 2D application
You totally *not* explained what is your 2D application...

gluser_new
01-09-2011, 12:53 AM
Hello ZbuffeR,

I am going to create many 2D iPhone Game Applications. All of them will move, rotate, scale, etc one extend to hundreds of graphic objects.

For an example an aquarium with many many many fishes - each one of them move around and collect food or someting like that.

Otherwise, I will need just a full hand of graphics for a racing game. In that game you can control one car (own) and drive racetracks to reach the best time.

But I am talking about every kind of 2D games. So this is an general question: Whats the best graphic library (OpenGL ES OR Quartz 2D) for 2D iPhone Game Applications?

At the moment I would lean towards to OpenGL ES, because there are many open source frameworks using that. But Quartz2D is nice too - in view of that easy handling!

arekkusu
01-09-2011, 01:21 PM
Generally speaking:

* Quartz is a 2D rendering library which guarantees exact results regardless of hardware. It is high quality (antialiasing, sub-pixel path intersections). It mostly rasterizes on the CPU.

* OpenGL is a low-level 2D/3D rendering library which does not guarantee exact results. It is low quality (very limited antialiasing). It mostly rasterizes on the GPU.

For most real-time applications, OpenGL is the right choice due to performance/battery life considerations. It is lower level, so there is a steeper learning curve. And you need to be aware of differences across hardware.



There is also a third option worth considering:

* Core Animation is a 2D rendering library with some limited 3D support. It does not guarantee exact results. It takes 2D content (generated either on the CPU or GPU) and does simple transformations in 2D or 3D, on the GPU.

For many sprite-based games, Core Animation is a good compromise between ease of use and performance.