|
|
|
@ -304,13 +304,13 @@ public class MeshHelper extends AbstractBlenderHelper { |
|
|
|
|
|
|
|
|
|
// creating vertices indices for this mesh
|
|
|
|
|
List<Integer> indexList = meshEntry.getValue(); |
|
|
|
|
short[] indices = new short[indexList.size()];//TODO: check if the model doesn't have more than 32767 vertices
|
|
|
|
|
for (int i = 0; i < indexList.size(); ++i) {//if yes then mesh.getVertices method must be changed to accept other than ShortBuffer
|
|
|
|
|
indices[i] = indexList.get(i).shortValue(); |
|
|
|
|
int[] indices = new int[indexList.size()]; |
|
|
|
|
for (int i = 0; i < indexList.size(); ++i) { |
|
|
|
|
indices[i] = indexList.get(i).intValue(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// setting vertices
|
|
|
|
|
mesh.setBuffer(Type.Index, 1, BufferUtils.createShortBuffer(indices)); |
|
|
|
|
mesh.setBuffer(Type.Index, 1, indices); |
|
|
|
|
mesh.setBuffer(verticesBuffer); |
|
|
|
|
mesh.setBuffer(verticesBind); |
|
|
|
|
|
|
|
|
|