Hardware acceleration: opengl es 1.1 vs 2.0

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.

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.

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?

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

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

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.

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.