From 27aab61d62ca6bd04556c623140d38761edaf56c Mon Sep 17 00:00:00 2001 From: Selmar Kok Date: Fri, 30 Nov 2018 18:01:31 +0100 Subject: [PATCH 1/2] Fix prettyprint to really not print pretty --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index d439746..fb2719b 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -4815,7 +4815,7 @@ bool TinyGLTF::WriteGltfSceneToFile(Model *model, const std::string &filename, if (writeBinary) { WriteBinaryGltfFile(filename, output.dump()); } else { - WriteGltfFile(filename, output.dump(prettyPrint ? 2 : 0)); + WriteGltfFile(filename, output.dump(prettyPrint ? 2 : -1)); } return true; From 5892d3e3ea9a455e518cdd3e501647ac1ab5b6c3 Mon Sep 17 00:00:00 2001 From: Selmar Kok Date: Tue, 4 Dec 2018 19:55:56 +0100 Subject: [PATCH 2/2] Set a default for sampler.wrapR, because it was serializing an uninitialized value --- tiny_gltf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index fb2719b..c9203cf 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -455,7 +455,8 @@ struct Sampler { Sampler() : wrapS(TINYGLTF_TEXTURE_WRAP_REPEAT), - wrapT(TINYGLTF_TEXTURE_WRAP_REPEAT) {} + wrapT(TINYGLTF_TEXTURE_WRAP_REPEAT), + wrapR(TINYGLTF_TEXTURE_WRAP_REPEAT){} bool operator==(const Sampler &) const; };