OpenGL ES 1.1 vs 2.0

Problems with Canvas, OpenGL, etc...

OpenGL ES 1.1 vs 2.0

Postby benny! » Wed Jan 05, 2011 5:58 am

Hi all,

I have some general questions about OpenGL ES (on Android). Currently I started to play around with some OpenGL ES 1.1 coding (targetting SDK1.6).

1.) Does the OpenGL ES 1.1 code build for SDK1.6 also run without any modification on newer Android versions (2.1, 2.2, 2.3 and upcoming) ?

2.) How big are the differences coding-wise between OpenGL ES from 1.1 vs 2.0? I have read that the whole processing pipeline changed and shaders are a must.

3.) Since the iPhone, current and upcoming versions of Android are using OpenGL ES 2.0 and even WebGL is based on OpenGL ES 2.0, I wonder what would you suggest to learn? Is it still useful to start coding using OpenGL ES 1.1 ?

Thanks in advance for your thoughts.

Best,
benny!
User avatar
benny!
Experienced Developer
Experienced Developer
 
Posts: 69
Joined: Tue Nov 27, 2007 3:36 pm
Location: end of www

Top

Re: OpenGL ES 1.1 vs 2.0

Postby jonbonazza » Wed Jan 05, 2011 6:02 am

The only real differece between the two versions is the number of methods available. 1.1 will run fine on OS version 1.6+, but 2.0 adds some really nice methods that aid in game creation tremendously.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: OpenGL ES 1.1 vs 2.0

Postby benny! » Wed Jan 05, 2011 6:28 am

jonbonazza wrote:The only real differece between the two versions is the number of methods available. 1.1 will run fine on OS version 1.6+, but 2.0 adds some really nice methods that aid in game creation tremendously.


Thanks for your answer. Since I am into game creation this sounds of course like a valid argument to go with OpenGL ES 2.0.
Currently, the percentage of Android 1.6 devices is still quite high. Although I know it is hard to measure - what are your thoughts about how long it would make sense to support 1.6 devices since more and more 2.x devices are flooding the market.
User avatar
benny!
Experienced Developer
Experienced Developer
 
Posts: 69
Joined: Tue Nov 27, 2007 3:36 pm
Location: end of www

Re: OpenGL ES 1.1 vs 2.0

Postby jonbonazza » Fri Jan 07, 2011 5:42 am

Honestly, by the end of the year (or perhaps sooner), I see a very small percentage of phones running below android 2.1.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: OpenGL ES 1.1 vs 2.0

Postby benny! » Fri Jan 07, 2011 6:00 am

jonbonazza wrote:Honestly, by the end of the year (or perhaps sooner), I see a very small percentage of phones running below android 2.1.


Thanks for your thoughts. Somehow I feel the same. I think I focus on 2.1++!
User avatar
benny!
Experienced Developer
Experienced Developer
 
Posts: 69
Joined: Tue Nov 27, 2007 3:36 pm
Location: end of www

Re: OpenGL ES 1.1 vs 2.0

Postby SnapDragon » Sat Jan 15, 2011 6:42 am

Actually there is a very large difference between OpenGL ES 1.1 and 2.0. The two APIs are incompatible with each other. For example, all modelview and projection matrices are the users responsibility in 2.0, calls such as glFrustum, glRotate, glPushmatrix, etc... are removed. You need to write both a vertex and fragment shader to handle vertex transformation and color output at a minimum. If you want lighting, you will have to do that in the shader as there is no GL Lighting (which, IMHO, is a good thing). You can stay with the OpenGL 1.1 APIs since they are still supported, but in most cases this is turned into a OpenGL 2.0 calls by the driver on a runtime basis. This can be a problematic issue since shaders need to be built, compiled, linked and loaded on the fly as the GL state changes. This can lead to performance issues if you are changing state enough that new shaders keep needing to be built. Usually, once a shader is built by the driver, it keeps it in a cache (flushed at the end of the application or earlier if cache is full) to be used again if that particular GL state comes up again to avoid the cost of building a new shader. The bottom line, if you need to support older, non OpenGL ES 2.0 HW, then go ahead and stick with OpenGL ES 1.1, otherwise it is wise to invest in learning and using OpenGL ES 2.0.
SnapDragon
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Jan 15, 2011 6:29 am

Top

Re: OpenGL ES 1.1 vs 2.0

Postby benny! » Sat Jan 15, 2011 10:09 am

@SnapDragon:
Thanks a lot for pointing that out. Very interesting to read your answer. Since I am interested in WebGL too (who
knows when mobile browsers will support it) - I think I go ahead and learn the OpenGL ES 2.0 way.

Thanks a lot!
User avatar
benny!
Experienced Developer
Experienced Developer
 
Posts: 69
Joined: Tue Nov 27, 2007 3:36 pm
Location: end of www

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 5 guests