PDA

View Full Version : Hardware acceleration: opengl es 1.1 vs 2.0



4ntoine
11-06-2010, 10:24 PM
Hello.

I try to figure out, is Java code on opengl es 1.1 hardware accelerated?

I've executed my application on device with Qualcomm (LG Optimus) and it was fast. On HTC Hero (without) it was very sluggish. There's no native code in app yet.

Do i have to rewrite my code from opengl es 1.1 to 2.0 (and shaders) to enable hardware acceleration? and do i have to write native code to enable it or i can use java only?

Thanks in advance.

aqnuep
11-07-2010, 10:04 AM
Whether OpenGL ES 1.1 or 2.0 is hardware accelerated depends on the target platform (both software and hardware). AFAIK HTC Hero has hardware acceleration. The "sluggish" rendering is most probably because of your renderer and not because of OpenGL.

Anyway, moving from 1.1 to 2.0 won't help improving performance. If 2.0 is hardware accelerated then you can bet 1.1 is also.

4ntoine
11-07-2010, 11:47 AM
Whether OpenGL ES 1.1 or 2.0 is hardware accelerated depends on the target platform (both software and hardware).
Did not catch that..
It is compiled using maven-android-plugin for platform = 3.
Does it mean that compiled for platform=5 f.e. is faster?



AFAIK HTC Hero has hardware acceleration. The "sluggish" rendering is most probably because of your renderer and not because of OpenGL.

// switch on hardware acceleration (in renderer constructor)
this.getHolder().setType(SurfaceHolder.SURFACE_TYP E_HARDWARE);



Anyway, moving from 1.1 to 2.0 won't help improving performance. If 2.0 is hardware accelerated then you can bet 1.1 is also.

i thought that shaders only are h/w accelerated. am i wrong?

aqnuep
11-15-2010, 03:13 PM
Did not catch that..
It is compiled using maven-android-plugin for platform = 3.
Does it mean that compiled for platform=5 f.e. is faster?
It can be possible that platform version affects hardware acceleration but I'm quite unsure. I played a bit with Android development but I cannot say that I am a master of it so maybe somebody with more experience can confirm or disprove it.


i thought that shaders only are h/w accelerated. am i wrong?
Not exactly. OpenGL ES 2.0 capable hardware actually "emulates" the fixed-functionality of OpenGL ES 1.1 by using built-in shaders in the driver to perform that what the fixed-function API calls ask for.
In fact it is possible that using pure shaders and only what you know you want to use might increase the performance but a naive switch would not have any visible effect.