JME3 Android Renderer/Tests update

Hello.



Recently @larynx sent a nice patch that solved the issues with HTC devices and incomplete support of VBO on other devices.

The patch has been commited and updated tests are available on the market.



Right now there two modes in which renderer operates.

One uses VBO (Vertex Buffer Object) and works only with one mesh/one material on Motorola and Samsung Galaxy devices.



Another one uses VA (Vertex Arrays) and should work on all devices that support OpenGL ES 2. At least a couple of people reported that it worked on a couple of HTC devices. With VA one can you several meshes and materials.



The tests that are available on the market allow to switch between two modes (VA and VBO) and also turn on/off verbose logging.



Right now there only two tests that do not work (TestEffects and TestTerrain).



The Physics test works but gets really low FPS when objects collide with each other. While there is no collision, it works fine.



I’m trying right now to redesign a renderer so that it will be easier to support different ways to render on different platforms.



I’m going to show the work in progress in a couple of days and if it looks better than what we have right now, I will commit it.



Thanks @larynx!

5 Likes

Hey, cool to hear that! You saw the new OpenGL1 renderer for lwjgl? It introduces some shader renderstate mapping features, maybe that will help for android too.

Can you please start to put together an ant build file that can create a jme3 android application with the android jMonkeyEngine3 library? I want to add Android distribution to jMP, I know one needs the android sdk for that, just link it somehow in the build file, I will put the rest together.

Cheers,

Normen

Very exciting!

A small question, are you making any modifications to the tests to make them work? Or are you loading “Application” classes via AndroidHarness?

Hello.

I use regular tests.

I have a “universal” android activity that loads application class.

I’ve just tested it on my HTC device (Nexus 1) and everything works as you describe as long as I check “use VA instead of VBO”.

Nice work!

HTC Desire:

Displays nothing with default settings.



Everything except ‘Hello Effects’ works with VA enabled.

bullet.TestSimplePhysics is pretty slow tho.

Core-Dump said:
bullet.TestSimplePhysics is pretty slow tho.

I am amazed it works at all :D
bullet isn't really designed for these cpus, maybe we got more luck when native bullet supports OpenCL ;)

HTC desire hd:

With new setting instead of vbo all works quite well, except hello effect and terrain, which are still blank

HelloTerrain class jme3test.helloworld.HelloTerrain import jme3tools.converters.ImageToAwt;

The class ImageToAwt import several java.awt.image classes. These classes exist in JRE, not in Android core library. I guess any JME classes using java.awt (except java.awt.font) do not work in android.

HTC Desire, Anroid 2.2, build: 2.10.405-2

Start test only with “use VA instead of VBO” (whithout them nothing is happend). Start every test 3-4 times



Lightning.j3md test: passed. SomeCrashReturn.

light.TestLightRadius: passed. SomeCrashReturn.

bullet.TestSimplePhisics: passed. NormalReturn.

helloword.HelloJME3: passed. CrashReturn.

helloword.HelloLoop: passed. CrashReturn.

helloword.HelloNode: passed. SomeCrashReturn.

helloword.HelloMaterial: passed. NormalReturn. Textures was shown head over heels.

helloword.HelloEffects: empty activity. NormalReturn.

helloword.HelloTerrain: empty activity. NormalReturn.



NormalReturn - Always return to main menu of JME Test.

SomeCrashReturn - Some times on press back key I return to the Home screen instead of main menu of JME Test.

CrashReturn - Every time on press back key I return to the Home screen instead of main menu of JME Test.



Where I can find logs?

HTC Desire (Bravo)

Android Froyo 2.2



All tests (except TestEffects and TestTerrain) work with “use VA instead of VBO” only.