OpenGL ES 2.0 on Android

Problems with Canvas, OpenGL, etc...

OpenGL ES 2.0 on Android

Postby cronus » Wed Aug 25, 2010 5:33 pm

I am learning Android development, specifically to eventually do OpengL 2.0 ES on it.

So far I have read that the NDK supports Opengl 2.0 ES.

However, is there also a Java API for it?

If there is a Java API for it, which one is recommended? I know both C++ and Java, so it is not a big deal if I have to use the NDK, but I would prefer to work only in Java if possible and without a big performance hit.
cronus
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Aug 25, 2010 5:32 pm

Top

Re: OpenGL ES 2.0 on Android

Postby jonbonazza » Wed Aug 25, 2010 6:33 pm

If making a game, then the ideal thing to do would be to use both. The SDK (java) should be your primary utility, however you can use the NDK (C++) to perform more memory intensive actions in order to make them perform faster.

As far as OpenGL ES 2.0 goes, It is currently only supported on devices running Android OS version 2.2. With this said, older devices--running earlier versions of the Android OS--do have support for 1.1 and 1.0 (Most devices have 1.1 support, however some VERY old devices will only supoprt 1.0).

All 3 versions of OpenGL can be found on the SDK's online documentation (http://developer.android.com/reference/ ... mmary.html).
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: OpenGL ES 2.0 on Android

Postby MichaelEGR » Wed Aug 25, 2010 9:11 pm

There is an "official" Java binding in FroYo for OpenGL ES 2.0. The only thing they don't tell you is that it is horribly broken and doesn't support VBOs. It was kicked out with no testing apparently and we are stuck with a broken binding. Check out this post for a 3rd party workaround:
http://apistudios.com/hosted/marzec/bad ... ess/?p=760

:: sigh :: Google... When will you learn that quality is important.

Basically I don't recommend using the official OpenGL ES 2.0 binding ever and just a 3rd party Java binding because otherwise what are you going to do.... Detect if FroYo then use 3rd party binding and entirely different code. Or if Android 3.0+ use official bindings and entirely different code. It's a real bummer stuff like this easily slips into Android.

A benefit of using the Bad Logic or any other 3rd party Java binding is that it works out of the box on all devices that support OpenGL ES 2.x and is not limited to being tied to the OS release itself like the "official" bindings.
Founder & Principal Architect; EGR Software LLC
http://www.typhonrt.org
http://www.egrsoftware.com
User avatar
MichaelEGR
Senior Developer
Senior Developer
 
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA

Top

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

Who is online

Users browsing this forum: No registered users and 3 guests