When the JME will support the OpenGL ES3.0? Especially the “drawInstance”

Hello everyone,

I want to know when the JME will support for OpenGL ES3.0, and I’m looking forward to using the “drawInstance”.

I did a small test on the source code of JME. When I mainly did this,

public void glDrawElementsInstancedARB(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) {
    //        throw new UnsupportedOperationException("Instancing not available on Android");
    GLES30.glDrawElementsInstanced(mode, indices_count, type, (int) indices_buffer_offset, primcount);
}

the JME could use the “drawInstance”. So you are preparing to use the OpenGL ES3.0 in the future right and Could you tell me when the JME will support the OpenGL ES3.0? Thank you.

If I read your right, JME 3.1 already supports instancing… it’s even built into the Lighting shader, etc. already with some convenience classes that work like batching.

Yeah but the android renderer doesn’t support it.
There are very few devices that are ogl es 3 capable for now. IMO relaying on instancing on mobile is shooting yourself in the foot, because you’ll significantly down scope your targeted devices range.

As you said, I know the limitations of OpenGL ES3.0, but it has the good method to let my scene to display according to my needs. Please look at the link below, there is the reason why I want to use the “drawInstance” in ES3.0, thank you.

Instancing is for showing many of the same mesh… and it is overall slower than batching.

I have a large scene, so I want to use the “drawInstance” to save my memory. Please look at the link below, there is the reason why I want to use the “drawInstance” in OpenGL ES3.0, thank you.

4 million and even 10 million triangles will never work on mobile even with instancing. That’s just too much…
Instancing or batching will not reduce the number of triangles it will reduce the number of draw calls.
How many objects do you have in your scene?

As for the “When”, the best way to have an answer is to make a pull request.

In my app, there are about 7 thousand different models, and needn’t to show all the models in one scene. The biggest number of models in one scene is about 600, and maybe I will display two or three scenes at the same time, and the triangles number is about from 10 to 20 million.

In my test, the triangles number is not the problem, because the mobile device’s GPU has the ability to render the scene, and I have a test in my mobile device (MI PAD) using the “drawInstance ” (I modified the JME source code), some data of the scene as bellow:
Objects = 28
Uniforms = 42
Triangles = 60225490
Vertices = 30380870
Fps = 5

The bottleneck of my app is mainly on the memory, so I want to use the “drawInstance” to save my memory, and there are many same models in my scene.

Could you point out what should I do, to display the scene that I want?

Thank you very much.

hardly working. And on one of the most powerful device out there…
You have no choice but to reduce your poly count.

@Momoko_Fan I guess we could check the caps in the android gl layer and use this call for instancing?

EDIT: rendering 10/20 million triangles on a mobile device is pointless. Nobody is going to see that detail. You’re just going to be overheating poor people’s phones and tablets.

I guess we’ll need to wait until this number goes up:
https://developer.android.com/about/dashboards/index.html#OpenGL

But yeah, I was thinking about enabling OpenGL ES 3.0 features for some time. Thing is, I don’t have any devices that support it, so I cannot really test.

2 Likes

In China, nearly all the new mobile devices are support for OpenGL ES 3.0 even if some cheap mobile devices , and there are more and more new devices to be used, so the JME is support for OpenGL ES 3.0 is very important to me, because it really has some good features to me, and the devices is not the problem. I hope the JME can support OpenGL ES 3.0 as soon as possible. Please think about it. Thank you very much.

If only because of this, I’m very glad to send you a testing device for the development of JME to support OpenGL ES 3.0, I’m serious. If you truly need one, you can leave your address. I will find a way to give you. Thank you sincerely.

Only for advice and hope the JME better:

I don’t think so. As we all know, the OpenGL ES 3.0 will must be popular, if we support it earlier, there must be more people to use the JME. In my opinion, we should prepare more for the future to interested more people learn about JME, and give the other people more choices about using OpenGL ES 3.0’s features or not. Because of I couldn’t use the OpenGL ES 3.0’s features, I feel a little bad, I really hope the JME could support for OpenGL ES 3.0 in the near future. This is only my own opinion, so hope you think about it, and not to feel bad because of it. Make yourself keep happy. Thank you very much.

@Momoko_Fan @nehon

In my scene, there are only dozens of models that appear hundreds of or even 1~2 thousand times, and the others only appear several times or even only one time.

That’s why I want to use the “drawInstance”. Isn’t it a good idea, when I draw the models that appear many times I use the “drawInstance”, and when I draw the models that appear only several times I use the “batching”?

Yes it would help in a perfect world.
But as said, it won’t reduce the number of triangle drawn on screen at once. So your perf gain will be a lot less that you may think.
However, it will definitely help on the memory side.

Also, using this you would limit your device compliance to 30% of the market. But that can be fine, if it’s enough for you.

1 Like

what are your chart axis ?

The x-axis is the models’s id, and the y-axis is the models’s count in the scene.

I show this picture is want you to know that there are only some models appeared many times in my scene, and I want to use the “drawInstance” to draw the models. But the JME is not support for OpenGL ES 3.0 now, so I hope the JME could support it as soon as possible.