Forced 4-bits alignment for glTF buffers
parent
d0bf5c10f9
commit
0f4189c77e
|
@ -485,7 +485,8 @@ uint8_t* new_data;
|
|||
inline size_t Buffer::AppendData(uint8_t* data, size_t length)
|
||||
{
|
||||
size_t offset = this->byteLength;
|
||||
Grow(length);
|
||||
// Force alignment to 4 bits
|
||||
Grow((length + 3) & ~3);
|
||||
memcpy(mData.get() + offset, data, length);
|
||||
return offset;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue