The current status:
1). The current source code in the repository does not build yet, but it is easy to fix. I’m working on it right now.
2). There are issues with non-Motorola and non-Samsung devices. The renderer does not render anything on HTC phones.
3). If we have two different shaders, the scene does not get rendered, but if you have all the objects in the scene use the same shader (for example Lighting.j3md), everything works as expected.
4). Recently I found that issue #2 and issue #3 might be related.
Right now JMonkeyEngine 3 uses VBO. Android 2.2 does not completely support VBO. For example, there is no GLES20.glDrawElements call that excepts integer as last parameter. Right now I’m calling GL11.glDrawElements that actually has an int parameter, but I think that is against the specification. We should not mix GL10/GL11/GL20 calls. This is why, I think, HTC devices do not render anything. They just ignore GL11 call.
Also I found an information on forums that people had same issues with VBO on Android 2.2. One suggestion from a google’s developer was to use native code to do glDrawElements.
But I want to reimplement the renrerer so that It supports rendering with VBO and without them and then have this choice tunable depending on the platform.
Unfortunately, the current JME3 rendering system does not help doing this staff. The rendering process is poorly abstracted. So I want to try to fix this problem as well.
Any help with these issues or any other help is appreciated!.
I think it should be possible to perhaps upload the VBO buffer with an offset? Possibly by using Buffer.position()?
Then you don’t need to pass int parameter to glDrawElements
antonyudin said:
For example, there is no GLES20.glDrawElements call that excepts integer as last parameter.
GLES20.glDrawElements(int mode, int count, int type, int offset) is in API level 9 (Android 2.3).
It has been awhile since I looked at jME. I used jME 1 for a project. I am loving having physics being included! Yesterday I downloaded and tried out the android test app. As predicted I only have a black screen.
I am wondering how the rendering issues on HTC phones are progressing?
If you need logcat or a HTC test phone I would be glad to help. I have tested ROMs before and made some of my own. I how to work with Android.
Hello,
I am wondering too how the rendering issues on HTC phones are progressing?
Thanks a lot.
Here is an update.
http://hub.jmonkeyengine.org/groups/android/forum/topic/jme3-android-renderertests-update/
Thanks, it works.