From 5364da4d8eae518b0a53fdbbf675c6bff1797fed Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Thu, 27 Oct 2022 12:22:00 -0700 Subject: SL-18411: GLTF material transform serialization, plus fix improper indexing not matching GLTF spec --- indra/llprimitive/llgltfmaterial.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llprimitive/llgltfmaterial.h') diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index ea7e402805..b0afb11bb5 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -118,6 +118,7 @@ public: void setRoughnessFactor(F32 roughness); void setAlphaMode(S32 mode); void setDoubleSided(bool double_sided); + void setTextureOffset(TextureInfo texture_info, const LLVector2& offset); void setTextureScale(TextureInfo texture_info, const LLVector2& scale); void setTextureRotation(TextureInfo texture_info, float rotation); @@ -189,5 +190,12 @@ public: void applyOverride(const LLGLTFMaterial& override_mat); +private: + + template + void setFromTexture(const tinygltf::Model& model, const T& texture_info, TextureInfo texture_info_id, LLUUID& texture_id_out); + + template + void writeToTexture(tinygltf::Model& model, T& texture_info, TextureInfo texture_info_id, const LLUUID& texture_id, bool is_override, const LLUUID& base_texture_id) const; }; -- cgit v1.2.3