mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 21:24:34 +00:00
update assimp to 6.0.5
This commit is contained in:
parent
2d2eb57e2e
commit
f5cf21cfeb
941 changed files with 22718 additions and 12240 deletions
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -239,29 +239,7 @@ inline size_t WriteArray(IOStream *stream, const T *in, unsigned int size) {
|
|||
* and the chunk contents to the container stream. This allows relatively easy chunk
|
||||
* chunk construction, even recursively.
|
||||
*/
|
||||
class AssbinChunkWriter : public IOStream {
|
||||
private:
|
||||
uint8_t *buffer;
|
||||
uint32_t magic;
|
||||
IOStream *container;
|
||||
size_t cur_size, cursor, initial;
|
||||
|
||||
private:
|
||||
// -------------------------------------------------------------------
|
||||
void Grow(size_t need = 0) {
|
||||
size_t new_size = std::max(initial, std::max(need, cur_size + (cur_size >> 1)));
|
||||
|
||||
const uint8_t *const old = buffer;
|
||||
buffer = new uint8_t[new_size];
|
||||
|
||||
if (old) {
|
||||
memcpy(buffer, old, cur_size);
|
||||
delete[] old;
|
||||
}
|
||||
|
||||
cur_size = new_size;
|
||||
}
|
||||
|
||||
class AssbinChunkWriter final : public IOStream {
|
||||
public:
|
||||
AssbinChunkWriter(IOStream *container, uint32_t magic, size_t initial = 4096) :
|
||||
buffer(nullptr),
|
||||
|
|
@ -315,6 +293,28 @@ public:
|
|||
|
||||
return pCount;
|
||||
}
|
||||
|
||||
private:
|
||||
// -------------------------------------------------------------------
|
||||
void Grow(size_t need = 0) {
|
||||
size_t new_size = std::max(initial, std::max(need, cur_size + (cur_size >> 1)));
|
||||
|
||||
const uint8_t *const old = buffer;
|
||||
buffer = new uint8_t[new_size];
|
||||
|
||||
if (old) {
|
||||
memcpy(buffer, old, cur_size);
|
||||
delete[] old;
|
||||
}
|
||||
|
||||
cur_size = new_size;
|
||||
}
|
||||
|
||||
private:
|
||||
uint8_t *buffer;
|
||||
uint32_t magic;
|
||||
IOStream *container;
|
||||
size_t cur_size, cursor, initial;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue