mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-12 04:29:05 +08:00
Support uint
This commit is contained in:
parent
be9ff66eeb
commit
fb99999c1a
@ -397,6 +397,9 @@ static uint32_t UnpackIndex(const unsigned char *ptr, int type) {
|
|||||||
// TODO(syoyo): Check overflow(2G+ index)
|
// TODO(syoyo): Check overflow(2G+ index)
|
||||||
int32_t data = *reinterpret_cast<const int32_t *>(ptr);
|
int32_t data = *reinterpret_cast<const int32_t *>(ptr);
|
||||||
return uint32_t(data);
|
return uint32_t(data);
|
||||||
|
} else if (type == TINYGLTF_COMPONENT_TYPE_UNSIGNED_INT) {
|
||||||
|
uint32_t data = *reinterpret_cast<const uint32_t *>(ptr);
|
||||||
|
return uint32_t(data);
|
||||||
} else if (type == TINYGLTF_COMPONENT_TYPE_SHORT) {
|
} else if (type == TINYGLTF_COMPONENT_TYPE_SHORT) {
|
||||||
uint32_t data = *reinterpret_cast<const uint32_t *>(ptr);
|
uint32_t data = *reinterpret_cast<const uint32_t *>(ptr);
|
||||||
return data;
|
return data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user