[android] Weird performance for simple scene

Started by
-1 comments, last by eduardo_costa 9 years, 7 months ago

Hey all!
I'm developing an engine in both WebGL and Android native using Haxe.
There is some strange performance issue happening though.

Running a simple example with 300 cubes in WebGL it runs at 60fps in Chrome Desktop and 30fps in Chrome Beta in my Nexus4.

300 cubes demo.
https://dl.dropboxusercontent.com/u/...0_1/index.html

Now. I'm also compiling the same demo in Android Java and generating an APK.
But the APK is running at 20-30fps top.
Considering that it is native, the performance shouldn't be above WebGL at least?

* If requested I can provide the APK too. *

## Extra Info ##

- Nexus4 Phone with latest android update.

- Haxe compiles its "Float" type into Java's "double".
- Cube shader is alpha blended and have 'discard' commands.
- GLSurfaceView 'isHardwareAccelerated' flag returns true.
- Tracing the GLES calls during render I'm issuing just a Uniform(WorldMatrix) + DrawArrays(TRIANGLES) per Cube (so 300 total)

This topic is closed to new replies.

Advertisement