From 239be2c09f2be88654cf4c9b8bb887a20d75ca4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 24 Jul 2018 23:23:56 +0200 Subject: [PATCH] Import texture names as well. Every other structure has it already. --- tiny_gltf.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tiny_gltf.h b/tiny_gltf.h index 4fab08d..d5d4673 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -456,6 +456,8 @@ struct Image { }; struct Texture { + std::string name; + int sampler; int source; // Required (not specified in the spec ?) Value extras; @@ -2224,6 +2226,8 @@ static bool ParseTexture(Texture *texture, std::string *err, const json &o, ParseExtensionsProperty(&texture->extensions, err, o); ParseExtrasProperty(&texture->extras, o); + ParseStringProperty(&texture->name, err, o, "name", false); + return true; }