Run jme3 simpleapp on emulator android

Is it possible?

regards

1 Like

Did you try?



Well, I think the answer is no, because the emulator doesn’t support OpenGL 2 yet.

So I have to buy a samsung galaxy S? : )



Any workaroud? Maybe I can add OpenGL 2 to emulator…I don’t know how but I can investigate.

Please give me some clue

You can’t, that’s the main issue for the actual development of the android renderer.

The emulator does not support OpenGL ES 2, and the developer has to own an Android device.

And anyway, from the feedback I get from the android developers I know (at work), the emulator is not reliable and very slow, so they all ended up testing directly on the device.

But you say me that a SimpleApplication can run normally on samsung galaxy S?!

This kind of device support OPEN GL ES 2?

As long as it has an Android 2.2 (or is it 2.1) or higher os, yes it supports ogl es 2.0

but I download android 2.3.3 and includes ApiDemos whith OPEN GL api samples that show cube, sphere and whatever using the emulator.

why do you say me that it does not exist a way to show jmonkey app to android activity app?

For what I see, android api samples use android.opengl.GLSurfaceView.If you extends GLSurfaceView and attach a renderer to it

should be ok.

Look at that :

[java]public class TouchRotateActivity extends Activity

public TouchSurfaceView(Context context) {

super(context);

mRenderer = new CubeRenderer();

setRenderer(mRenderer);

setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);

}…[/java]

where CubeRender implements GLSurfaceView.Renderer.

So probably com.jme3.renderer is not compliant with GLSurfaceView.Renderer?

Sorry for my poor english

Are they using shaders?

Search for glCreateProgram

what?

Search for glCreateProgram in the code

OGLESShaderRenderer ,in android jme3 branch contains glCreateProgram but it has some problems and actually it is not fixed in jme3 repository.

You mean that?

Or you mean to look for glCreateProgram in Android APIDemos samples?

Could u be less ermetic please? ; )

Thanks a lot for ur reply anyway

OGLESShaderRenderer should work on a real phone with android 2.2+ if you set the flag use_va (vertex arrays) to true. antony did a commit a few days ago - did you update?



I tested with 2.3.3 emulator and compiled against API 10 - and it doesnt work for me.

From what i have googled there is a software OpenGL ES 1.1 renderer in the emulator,

ES 2.0 is NOT supported on the emulator.



I/MainActivity( 349): starting app ...
I/JmeSystem( 349): Running on jMonkey Engine 3 ALPHA 0.50 Android
I/MainActivity( 349): starting app ... done.
I/com.jme3.scene.Node( 349): All children removed.
I/MainActivity( 349): creating context ...
I/MainActivity( 349): creating context ... done.
I/MainActivity( 349): creating view ...
I/OGLESContext( 349): setEGLContextClientVersion(2)
I/OGLESContext( 349): setEGLContextClientVersion(2) ... done.
I/MainActivity( 349): creating view ... done.
I/MainActivity( 349): setting content view ...
I/MainActivity( 349): setting content done ...
I/MainActivity( 349): onResume ...
I/MainActivity( 349): view.onResume ...
I/MainActivity( 349): view.onResume ... done.
I/MainActivity( 349): onResume ... done.
D/libEGL ( 349): egl.cfg not found, using default config
D/libEGL ( 349): loaded /system/lib/egl/libGLES_android.so
I/ActivityManager( 67): Displayed com.test.android/.MainActivity: +5s73ms (total +2m19s804ms)
I/ActivityManager( 67): Displayed com.android.launcher/com.android.launcher2.Launcher: +2m19s860ms
W/dalvikvm( 349): threadid=9: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 349): FATAL EXCEPTION: GLThread 10
E/AndroidRuntime( 349): java.lang.IllegalArgumentException: No configs match configSpec
E/AndroidRuntime( 349): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:763)
E/AndroidRuntime( 349): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:919)
E/AndroidRuntime( 349): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1264)
E/AndroidRuntime( 349): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
W/ActivityManager( 67): Force finishing activity com.test.android/.MainActivity

how do you build android games in jme3 anyways??? ohh… I’m a beginner… XD

Hi,



I try to run a simple application and when i call createView in OGLESContext, was returned a NotSuchMethodError in com.jme3.input.android.AndroidInput.setEGLContextClientVersion