Quartz 2D or OpenGL ES? Pros and cons in the long term, possibility of migration to other platforms

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-20 14:42:02

问题


I'm having a hard time deciding whether to go with Quartz2D or OpenGL for an iPad game. It will be 2D mostly, but effect-intense (simultaneous lighting effects for 10-30 objects, 10-20 simultaneous animations on the screen). So far, assuming i'm equally dumb in both technologies and have to learn them from the ground, i came to this list. (I've read several topics here, on SO, with names like "Quartz or OpenGL", but i'm still left with some questions)

Quartz:

  • Better time-to-market, because of ready to use absractions like UIView, UIImageView, CoreAnimation abstractions

Open GL ES

  • Closer to hardware, thus, performance is better.

  • App, implemented with OpenGL ES can be easier migrated to Android, MeeGo, Windows Phone, etc.

My questions are:

  1. How time will it take to rewrite Quartz 2d app to use OpenGL? Lets say it took me 2 man-month to write Quartz app, how much time will i need to rewrite it? (Please, just some subjective opinions, i'll try to summarize them somehow)
  2. Regarding the ease of migration to other platforms, when using OpenGL, is it really so? Or efforts when migrating Quartz app from iPhoneOS to Android will be not so much bigger, compared to OpenGL app migration? (Ease of migration is quite important criterion)
  3. Regarding OpenGL, should i go with OpenGL 1.1 or 2.0, concerning migration? (Android supports 2.0 through NDK, but dont know whether NDK's use will increase or decrease migration efforts)

回答1:


use a framework that is cross platform

Cocos2d for android: http://code.google.com/p/cocos2d-android/

Cocos2d for iphone:

http://code.google.com/p/cocos2d-iphone/




回答2:


I will only answer Android related part of your question since I don't have any knowledge regarding Quartz

The biggest difference between OpenGL ES 1.1 and 2.0 is the programmable pipeline In 1.1 there is a default fixed pipeline, but in 2.0 the pipeline changed to programmable so you have to write youw own pipeline even to do some lighting. And there is a lot of time since your question, now Android supports OpenGL ES 2.0 with its framework API also alongside with NDK. For the usage rates according to Android dashboard; 99.8 % of Android devices support both version 2.0 & 1.1 http://developer.android.com/about/dashboards/index.html#OpenGL

P.S OpenGL ES 3.0 is introduced with Android 4.3 so these rates might be subject to change.

For Cocos2D related question in above answer, Cocos2D-X uses OpenGL ES 2.0 in Android so it is also high probable that Cocos2D for Android uses OpenGL ES 2.0, too.



来源:https://stackoverflow.com/questions/2598408/quartz-2d-or-opengl-es-pros-and-cons-in-the-long-term-possibility-of-migration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!