changed std::to_string to to_string.
parent
59ea3b6c85
commit
c874fd8ae2
|
@ -349,7 +349,7 @@ void Discreet3DSImporter::ParseObjectChunk()
|
||||||
case Discreet3DS::CHUNK_MAT_MATERIAL:
|
case Discreet3DS::CHUNK_MAT_MATERIAL:
|
||||||
|
|
||||||
// Add a new material to the list
|
// Add a new material to the list
|
||||||
mScene->mMaterials.push_back(D3DS::Material(std::string("UNNAMED_" + std::to_string(mScene->mMaterials.size()))));
|
mScene->mMaterials.push_back(D3DS::Material(std::string("UNNAMED_" + to_string(mScene->mMaterials.size()))));
|
||||||
ParseMaterialChunk();
|
ParseMaterialChunk();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -948,24 +948,24 @@ Ref<Buffer> buf = pAsset_Root.buffers.Get(pCompression_Open3DGC.Buffer);
|
||||||
size_t size_coordindex = ifs.GetNCoordIndex() * 3;// See float attributes note.
|
size_t size_coordindex = ifs.GetNCoordIndex() * 3;// See float attributes note.
|
||||||
|
|
||||||
if(primitives[0].indices->count != size_coordindex)
|
if(primitives[0].indices->count != size_coordindex)
|
||||||
throw DeadlyImportError("GLTF: Open3DGC. Compressed indices count (" + std::to_string(size_coordindex) +
|
throw DeadlyImportError("GLTF: Open3DGC. Compressed indices count (" + to_string(size_coordindex) +
|
||||||
") not equal to uncompressed (" + std::to_string(primitives[0].indices->count) + ").");
|
") not equal to uncompressed (" + to_string(primitives[0].indices->count) + ").");
|
||||||
|
|
||||||
size_coordindex *= sizeof(IndicesType);
|
size_coordindex *= sizeof(IndicesType);
|
||||||
// Coordinates
|
// Coordinates
|
||||||
size_t size_coord = ifs.GetNCoord();// See float attributes note.
|
size_t size_coord = ifs.GetNCoord();// See float attributes note.
|
||||||
|
|
||||||
if(primitives[0].attributes.position[0]->count != size_coord)
|
if(primitives[0].attributes.position[0]->count != size_coord)
|
||||||
throw DeadlyImportError("GLTF: Open3DGC. Compressed positions count (" + std::to_string(size_coord) +
|
throw DeadlyImportError("GLTF: Open3DGC. Compressed positions count (" + to_string(size_coord) +
|
||||||
") not equal to uncompressed (" + std::to_string(primitives[0].attributes.position[0]->count) + ").");
|
") not equal to uncompressed (" + to_string(primitives[0].attributes.position[0]->count) + ").");
|
||||||
|
|
||||||
size_coord *= 3 * sizeof(float);
|
size_coord *= 3 * sizeof(float);
|
||||||
// Normals
|
// Normals
|
||||||
size_t size_normal = ifs.GetNNormal();// See float attributes note.
|
size_t size_normal = ifs.GetNNormal();// See float attributes note.
|
||||||
|
|
||||||
if(primitives[0].attributes.normal[0]->count != size_normal)
|
if(primitives[0].attributes.normal[0]->count != size_normal)
|
||||||
throw DeadlyImportError("GLTF: Open3DGC. Compressed normals count (" + std::to_string(size_normal) +
|
throw DeadlyImportError("GLTF: Open3DGC. Compressed normals count (" + to_string(size_normal) +
|
||||||
") not equal to uncompressed (" + std::to_string(primitives[0].attributes.normal[0]->count) + ").");
|
") not equal to uncompressed (" + to_string(primitives[0].attributes.normal[0]->count) + ").");
|
||||||
|
|
||||||
size_normal *= 3 * sizeof(float);
|
size_normal *= 3 * sizeof(float);
|
||||||
// Additional attributes.
|
// Additional attributes.
|
||||||
|
@ -989,8 +989,8 @@ Ref<Buffer> buf = pAsset_Root.buffers.Get(pCompression_Open3DGC.Buffer);
|
||||||
if(idx_texcoord < primitives[0].attributes.texcoord.size())
|
if(idx_texcoord < primitives[0].attributes.texcoord.size())
|
||||||
{
|
{
|
||||||
if(primitives[0].attributes.texcoord[idx]->count != tval)
|
if(primitives[0].attributes.texcoord[idx]->count != tval)
|
||||||
throw DeadlyImportError("GLTF: Open3DGC. Compressed texture coordinates count (" + std::to_string(tval) +
|
throw DeadlyImportError("GLTF: Open3DGC. Compressed texture coordinates count (" + to_string(tval) +
|
||||||
") not equal to uncompressed (" + std::to_string(primitives[0].attributes.texcoord[idx]->count) + ").");
|
") not equal to uncompressed (" + to_string(primitives[0].attributes.texcoord[idx]->count) + ").");
|
||||||
|
|
||||||
idx_texcoord++;
|
idx_texcoord++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue