Re the emulator, it just has a software driver for OpenGL.

Re the Droid, one problem you may be running into is a good EGL frame
buffer configuration not being chosen. There's an interesting thread
on the best configs for Droid here:
http://groups.google.com/group/android-developers/browse_thread/thread/734a5f5d8d800ef1/53104ea7d9706f37

One thing that makes this more likely for the sprite method test is
that it packages its own old version of GLSurfaceView. Meanwhile the
version of GLSurfaceView included in Android has been getting updated
in this area.

For example, in Donut you can see it preferring configs with the
smallest depth buffer, all other things it checks for being equal:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=opengl/java/android/opengl/GLSurfaceView.java;h=ccb27ccf2ad8ca4b93116aec9cbe36b1337bc01b;hb=refs/heads/donut#l671

But in Eclair it likes the first config with a depth buffer that is
big enough:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=opengl/java/android/opengl/GLSurfaceView.java;h=9ca57bae7a1fe1d6ec818169d2fcc205276ea0e0;hb=refs/heads/eclair#l739

This was probably done because on the Droid the configs with a depth
buffer of 24 don't have the EGL_SLOW_CONFIG caveat. The configs with a
depth buffer of 16 do have EGL_SLOW_CONFIG. So a 24 depth buffer is
faster than 16, and will be earlier in the list because
eglChooseConfig returns configs with EGL_SLOW_CONFIG after configs
without it.

I haven't checked what the the version of GLSurfaceView in sprite
method test does, but it might be worth checking to be sure you are
getting a RGB565 config instead of RGB888, etc..

Another thing you may want to check is that sprite method test isn't
being run in compatibility mode, as per this page:
http://developer.android.com/intl/zh-CN/guide/practices/screens_support.html

That would mean the app is drawing to a smaller area that is then
resized up. That could hurt performance. Avoiding that depends on
updating the manifest, not just the build target.

On Dec 20, 11:50 pm, FindYodaWinCash <[email protected]> wrote:
> Hello folks,
>
> I have downloaded and run the SpriteMethodTest on my Droid but
> compiled to 1.6 Android. I am getting the very strange behavior that
> drawing bitmaps to *canvas* is faster than using OpenGL. At 100
> sprites, I am getting about 64 fps for Canvas. For OpenGL, its around
> 34 fps.
>
> I also ran the same test on the 1.6 emulator.  100 sprites came in at
> 30 fps for canvas, just 6 for OpenGL!
>
> I was so astonished that I actually checked that the radio buttons
> were running the right tests.
>
> Does anyone know why this might be happening?!?!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to