mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Update Assimp from 5.2.3 to 5.2.5
This commit is contained in:
parent
ea7ca63301
commit
16f3710058
379 changed files with 14469 additions and 47175 deletions
|
|
@ -53,9 +53,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#endif
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace glTFCommon;
|
||||
|
||||
namespace glTF {
|
||||
using namespace glTFCommon;
|
||||
|
||||
#if _MSC_VER
|
||||
#pragma warning(push)
|
||||
|
|
@ -891,12 +891,12 @@ inline void Mesh::Decode_O3DGC(const SCompression_Open3DGC &pCompression_Open3DG
|
|||
auto get_buf_offset = [](Ref<Accessor> &pAccessor) -> size_t { return pAccessor->byteOffset + pAccessor->bufferView->byteOffset; };
|
||||
|
||||
// Indices
|
||||
ifs.SetCoordIndex((IndicesType *const)(decoded_data + get_buf_offset(primitives[0].indices)));
|
||||
ifs.SetCoordIndex((IndicesType *)(decoded_data + get_buf_offset(primitives[0].indices)));
|
||||
// Coordinates
|
||||
ifs.SetCoord((o3dgc::Real *const)(decoded_data + get_buf_offset(primitives[0].attributes.position[0])));
|
||||
ifs.SetCoord((o3dgc::Real *)(decoded_data + get_buf_offset(primitives[0].attributes.position[0])));
|
||||
// Normals
|
||||
if (size_normal) {
|
||||
ifs.SetNormal((o3dgc::Real *const)(decoded_data + get_buf_offset(primitives[0].attributes.normal[0])));
|
||||
ifs.SetNormal((o3dgc::Real *)(decoded_data + get_buf_offset(primitives[0].attributes.normal[0])));
|
||||
}
|
||||
|
||||
for (size_t idx = 0, idx_end = size_floatattr.size(), idx_texcoord = 0; idx < idx_end; idx++) {
|
||||
|
|
@ -904,7 +904,7 @@ inline void Mesh::Decode_O3DGC(const SCompression_Open3DGC &pCompression_Open3DG
|
|||
case o3dgc::O3DGC_IFS_FLOAT_ATTRIBUTE_TYPE_TEXCOORD:
|
||||
if (idx_texcoord < primitives[0].attributes.texcoord.size()) {
|
||||
// See above about absent attributes.
|
||||
ifs.SetFloatAttribute(static_cast<unsigned long>(idx), (o3dgc::Real *const)(decoded_data + get_buf_offset(primitives[0].attributes.texcoord[idx])));
|
||||
ifs.SetFloatAttribute(static_cast<unsigned long>(idx), (o3dgc::Real *)(decoded_data + get_buf_offset(primitives[0].attributes.texcoord[idx])));
|
||||
idx_texcoord++;
|
||||
}
|
||||
|
||||
|
|
@ -1114,10 +1114,6 @@ inline void AssetMetadata::Read(Document &doc) {
|
|||
ReadMember(*curProfile, "version", this->profile.version);
|
||||
}
|
||||
}
|
||||
|
||||
if (version.empty() || version[0] != '1') {
|
||||
throw DeadlyImportError("GLTF: Unsupported glTF version: ", version);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -1222,6 +1218,10 @@ inline void Asset::Load(const std::string &pFile, bool isBinary) {
|
|||
|
||||
// Load the metadata
|
||||
asset.Read(doc);
|
||||
if (!asset) {
|
||||
return;
|
||||
}
|
||||
|
||||
ReadExtensionsUsed(doc);
|
||||
|
||||
// Prepare the dictionaries
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue