if (md.getMaxTextureUnitUsed() >= 0) { if (!useTextures) { useTextures = true; throw new IllegalArgumentException("all MeshData objects with texcoords must use same tuple size."); maxTextures = Math.max(maxTextures, md.getMaxTextureUnitUsed() + 1);
final int maxUVUnit = mesh.getMeshData().getMaxTextureUnitUsed(); final Vector2[][] tex; if (maxUVUnit >= 0) {
final FloatBufferData tangents = meshData.getTangentBuffer() != null ? meshData.getTangentCoords().makeCopy() : null; final FloatBufferData[] uvs = new FloatBufferData[meshData.getMaxTextureUnitUsed() + 1]; for (int k = 0; k < uvs.length; k++) { final FloatBufferData tex = meshData.getTextureCoords(k);