|
|
@ -132,11 +132,11 @@ public class GeometryBatchFactory { |
|
|
|
|
|
|
|
|
|
|
|
for (VertexBuffer vb : geom.getMesh().getBufferList().getArray()) { |
|
|
|
for (VertexBuffer vb : geom.getMesh().getBufferList().getArray()) { |
|
|
|
int currentCompsForBuf = compsForBuf[vb.getBufferType().ordinal()]; |
|
|
|
int currentCompsForBuf = compsForBuf[vb.getBufferType().ordinal()]; |
|
|
|
if (currentCompsForBuf != 0 && currentCompsForBuf != vb.getNumComponents()) { |
|
|
|
if (vb.getBufferType() != Type.Index && currentCompsForBuf != 0 && currentCompsForBuf != vb.getNumComponents()) { |
|
|
|
throw new UnsupportedOperationException("The geometry " + geom + " buffer " + vb.getBufferType() + |
|
|
|
throw new UnsupportedOperationException("The geometry " + geom + " buffer " + vb.getBufferType() |
|
|
|
" has different number of components than the rest of the meshes " + |
|
|
|
+ " has different number of components than the rest of the meshes " |
|
|
|
"(this: " + vb.getNumComponents() + ", expected: " + currentCompsForBuf + ")"); |
|
|
|
+ "(this: " + vb.getNumComponents() + ", expected: " + currentCompsForBuf + ")"); |
|
|
|
} |
|
|
|
} |
|
|
|
compsForBuf[vb.getBufferType().ordinal()] = vb.getNumComponents(); |
|
|
|
compsForBuf[vb.getBufferType().ordinal()] = vb.getNumComponents(); |
|
|
|
formatForBuf[vb.getBufferType().ordinal()] = vb.getFormat(); |
|
|
|
formatForBuf[vb.getBufferType().ordinal()] = vb.getFormat(); |
|
|
|
} |
|
|
|
} |
|
|
|