summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-05-28 20:54:03 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-05-28 21:07:17 +0300
commit0dbf2b40f6f30728858fadb6390c465dc36669aa (patch)
treea15d5122ddb6d6fc03608003b2f6bcc4bd9224b8
parent4c60231c3fa52a0875ff5ddd7cc4e416f839da95 (diff)
#4080 Fix gltf crash when opening
-rw-r--r--indra/newview/gltf/buffer_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/gltf/buffer_util.h b/indra/newview/gltf/buffer_util.h
index ef9bba8128..2632a0f263 100644
--- a/indra/newview/gltf/buffer_util.h
+++ b/indra/newview/gltf/buffer_util.h
@@ -159,6 +159,12 @@ namespace LL
}
template<>
+ inline void copyVec3<F32, LLColor4U>(F32* src, LLColor4U& dst)
+ {
+ dst.set((U8)(src[0] * 255.f), (U8)(src[1] * 255.f), (U8)(src[2] * 255.f), 255);
+ }
+
+ template<>
inline void copyVec3<U16, LLColor4U>(U16* src, LLColor4U& dst)
{
dst.set((U8)(src[0]), (U8)(src[1]), (U8)(src[2]), 255);