mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
* Adjustment: Update Assimp version to 5.0.1.
This commit is contained in:
parent
14ebeaf3eb
commit
4758f7bdaf
679 changed files with 50502 additions and 19698 deletions
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
Copyright (c) 2006-2019, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ inline void Buffer::Read(Value& obj, Asset& r)
|
|||
}
|
||||
else { // Local file
|
||||
if (byteLength > 0) {
|
||||
std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir) : "";
|
||||
std::string dir = !r.mCurrentAssetDir.empty() ? (r.mCurrentAssetDir + "/") : "";
|
||||
|
||||
IOStream* file = r.OpenFile(dir + uri, "rb");
|
||||
if (file) {
|
||||
|
|
@ -688,9 +688,7 @@ inline void Image::SetData(uint8_t* data, size_t length, Asset& r)
|
|||
bufferView->byteOffset = b->AppendData(data, length);
|
||||
}
|
||||
else { // text file: will be stored as a data uri
|
||||
uint8_t *temp = new uint8_t[length];
|
||||
memcpy(temp, data, length);
|
||||
this->mData.reset(temp);
|
||||
this->mData.reset(data);
|
||||
this->mDataLength = length;
|
||||
}
|
||||
}
|
||||
|
|
@ -1429,6 +1427,9 @@ inline void Asset::ReadExtensionsUsed(Document& doc)
|
|||
}
|
||||
}
|
||||
|
||||
#define CHECK_EXT(EXT) \
|
||||
if (exts.find(#EXT) != exts.end()) extensionsUsed.EXT = true;
|
||||
|
||||
CHECK_EXT(KHR_binary_glTF);
|
||||
CHECK_EXT(KHR_materials_common);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue