mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-12 19:47:27 +00:00
Added support for unsigned int accessors (#245)
* Added Unsigned Int to CreateAccessors() * Added UnsignedIntAccessor class * Added UnsignedIntAccessor class function implementations * Oops * Update src/ObjLoading/XModel/Gltf/Internal/GltfAccessor.cpp Co-authored-by: Jan <Laupetin@users.noreply.github.com> * Fixed ReadElement() using incorrect elementSize --------- Co-authored-by: Jan <Laupetin@users.noreply.github.com>
This commit is contained in:
@@ -650,6 +650,8 @@ namespace
|
||||
m_accessors.emplace_back(std::make_unique<UnsignedByteAccessor>(bufferView, jAccessor.type, byteOffset, jAccessor.count));
|
||||
else if (jAccessor.componentType == JsonAccessorComponentType::UNSIGNED_SHORT)
|
||||
m_accessors.emplace_back(std::make_unique<UnsignedShortAccessor>(bufferView, jAccessor.type, byteOffset, jAccessor.count));
|
||||
else if (jAccessor.componentType == JsonAccessorComponentType::UNSIGNED_INT)
|
||||
m_accessors.emplace_back(std::make_unique<UnsignedIntAccessor>(bufferView, jAccessor.type, byteOffset, jAccessor.count));
|
||||
else
|
||||
throw GltfLoadException(std::format("Accessor has unsupported component type {}", static_cast<unsigned>(jAccessor.componentType)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user