|
|
@ -1969,17 +1969,17 @@ bool ExportMesh(Mesh mesh, const char *fileName) |
|
|
|
|
|
|
|
for (int i = 0, v = 0; i < mesh.vertexCount; i++, v += 3) |
|
|
|
{ |
|
|
|
byteCount += sprintf(txtData + byteCount, "v %.2f %.2f %.2f\n", mesh.vertices[v], mesh.vertices[v + 1], mesh.vertices[v + 2]); |
|
|
|
byteCount += sprintf(txtData + byteCount, "v %.6f %.6f %.6f\n", mesh.vertices[v], mesh.vertices[v + 1], mesh.vertices[v + 2]); |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0, v = 0; i < mesh.vertexCount; i++, v += 2) |
|
|
|
{ |
|
|
|
byteCount += sprintf(txtData + byteCount, "vt %.3f %.3f\n", mesh.texcoords[v], mesh.texcoords[v + 1]); |
|
|
|
byteCount += sprintf(txtData + byteCount, "vt %.6f %.6f\n", mesh.texcoords[v], mesh.texcoords[v + 1]); |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0, v = 0; i < mesh.vertexCount; i++, v += 3) |
|
|
|
{ |
|
|
|
byteCount += sprintf(txtData + byteCount, "vn %.3f %.3f %.3f\n", mesh.normals[v], mesh.normals[v + 1], mesh.normals[v + 2]); |
|
|
|
byteCount += sprintf(txtData + byteCount, "vn %.4f %.4f %.4f\n", mesh.normals[v], mesh.normals[v + 1], mesh.normals[v + 2]); |
|
|
|
} |
|
|
|
|
|
|
|
if (mesh.indices != NULL) |
|
|
|