mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 14:35:54 +08:00
GetTypeSizeInBytes not returning Type Size In Bytes
Changed name to be less misleading.
This commit is contained in:
parent
ff51570c26
commit
83ccb9f28d
@ -195,7 +195,7 @@ static inline int32_t GetComponentSizeInBytes(uint32_t componentType) {
|
||||
}
|
||||
}
|
||||
|
||||
static inline int32_t GetTypeSizeInBytes(uint32_t ty) {
|
||||
static inline int32_t GetNumComponentsInType(uint32_t ty) {
|
||||
if (ty == TINYGLTF_TYPE_SCALAR) {
|
||||
return 1;
|
||||
} else if (ty == TINYGLTF_TYPE_VEC2) {
|
||||
@ -745,7 +745,7 @@ struct Accessor {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int typeSizeInBytes = GetTypeSizeInBytes(static_cast<uint32_t>(type));
|
||||
int typeSizeInBytes = GetNumComponentsInType(static_cast<uint32_t>(type));
|
||||
if (typeSizeInBytes <= 0) {
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user