diff --git a/code/glTFAsset.h b/code/glTFAsset.h index 80a2d0008..5f4f933d9 100644 --- a/code/glTFAsset.h +++ b/code/glTFAsset.h @@ -736,7 +736,7 @@ namespace glTF { using SExtension::Type; - std::string BufferView;///< Name of "bufferView" used for storing compressed data. + std::string Buffer;///< ID of "buffer" used for storing compressed data. size_t Offset;///< Offset in "bufferView" where compressed data are stored. size_t Count;///< Count of elements in compressed data. Is always equivalent to size in bytes: look comments for "Type" and "Component_Type". size_t IndicesCount;///< Count of indices in mesh. diff --git a/code/glTFAssetWriter.inl b/code/glTFAssetWriter.inl index e8ca28bb5..f30e8cf89 100644 --- a/code/glTFAssetWriter.inl +++ b/code/glTFAssetWriter.inl @@ -219,7 +219,7 @@ namespace glTF { // filling object "compressedData" json_comp_data.SetObject(); - json_comp_data.AddMember("bufferView", ptr_ext_comp->BufferView, w.mAl); + json_comp_data.AddMember("buffer", ptr_ext_comp->Buffer, w.mAl); json_comp_data.AddMember("byteOffset", ptr_ext_comp->Offset, w.mAl); json_comp_data.AddMember("componentType", 5121, w.mAl); json_comp_data.AddMember("type", "SCALAR", w.mAl); diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp index 2f30cd579..1dc35b5cd 100644 --- a/code/glTFExporter.cpp +++ b/code/glTFExporter.cpp @@ -426,7 +426,7 @@ bool comp_allow;// Point that data of current mesh can be compressed. Mesh::SCompression_Open3DGC* ext = new Mesh::SCompression_Open3DGC; // Fill it. - ext->BufferView = p.indices->bufferView->id; + ext->Buffer = b->id; ext->Offset = idx_srcdata_begin; ext->Count = b->byteLength - idx_srcdata_begin; ext->IndicesCount = comp_o3dgc_ifs.GetNCoordIndex();