Problem loading model consisting of custom meshes

Hi there,

I created a model consisting of custom meshes.
When I load the model in SceneComposer it looks fine.
When I deploy my Game for Windows and start it, it looks fine.
When I deploy my Game for Android and start it, i get the following Exception.

com.jme3.renderer.RendererException: OpenGL ES does not support 32-bit index buffers.
Split your models to avoid going over 65536 vertices.

This is strange, because loading the model in SceneComposer tells me it has 636 vertexes, which seems reasonable to me.

The answer to my problem might be, that I haven’t implemented read/write methods for my mesh yet (see: http://hub.jmonkeyengine.org/forum/topic/custom-mesh-shapes-not-loading-in-scenecomposer )
But I wonder why this is not a problem on Windows, but might be one on Android.

So maybe the problem is somewhere else.

Any help would be appreciated!

Hey,

I now implemented read/write methods.
My problem is still there.

Any ideas?

Well, I’m looking at your code (not really) and I can see that you’ve defined your index buffer as int instead of short. If I could see the code then I could point right to it but I can’t so I will have to let you find it.

Edit: Ok, I did click through. Right here:
this.setBuffer(Type.Index, 3, BufferUtils.createIntBuffer(indexes));

Do you see how that says createIntBuffer instead of createShortBuffer?

…could be related to your error.

1 Like

Oh wow,

it works now, thank you very much.
Didn’t expect it could be that obvious.