Normal buffer throws "OpenGL ES does not support 32-bit index buffers."

I hava a custom subclass of mesh where I manually generate meshes, i calculate the normals for the triangles and put them in a normal list which is then converted to a float buffer (see code below) and set as a normal buffer of the Mesh object. This all works fine on the desktop and also looks correctly. But when i run it on an android phone the following error is thrown:

[java]06-13 14:50:25.605: W/System.err(26786): com.jme3.renderer.RendererException: OpenGL ES does not support 32-bit index buffers.Split your models to avoid going over 65536 vertices.
06-13 14:50:25.610: W/System.err(26786): at[/java]

here is the code which is relevant:

]if (normals.size() > 0) {
float[] list = listAsArray(normals);
FloatBuffer normalbuffer = BufferUtils
this.setBuffer(VertexBuffer.Type.Normal, 3, normalbuffer);

private float[] listAsArray(ArrayList<Vector3f> normals) {
	float[] r = new float[normals.size() * 3];
	for (int i = 0; i < normals.size() * 3; i += 3) {
		r[i] = normals.get(i / 3).x;
		r[i + 1] = normals.get(i / 3).y;
		r[i + 2] = normals.get(i / 3).z;
	return r;


i used the box class to understand how to set the normal buffer and the box is displayed without problems on android so I dont geht what the problem is, how do i have to create the buffer?

and its the same problem when i do it like this:

[java]if (normals.size() > 0) {
float[] list = listAsArray(normals);
setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(list));

Well its not the normla buffer thats the problem here as it seems, where are you generating getting the index buffers from?

oh you are right i was looking at the wrong direction, it was the int buffer for the geometry, i now use a short buffer and it seams to work :slight_smile: thanks for the hint

Thanks guys!