Sign in to follow this  
eduardo_costa

[android] Weird performance for simple scene

Recommended Posts

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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this