From 3ddf8301f67f056ada0d9075526237606221949b Mon Sep 17 00:00:00 2001 From: Alvaro Barua Date: Thu, 18 Mar 2021 00:21:23 +0000 Subject: [PATCH 1/2] Added TINYGLTF_NO_INCLUDE_RAPIDJSON for consistency and because my project already used rapidjson/ --- tiny_gltf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tiny_gltf.h b/tiny_gltf.h index 2fd3e90..3ce808d 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -1538,6 +1538,7 @@ class TinyGLTF { #ifndef TINYGLTF_USE_RAPIDJSON #include "json.hpp" #else +#ifndef TINYGLTF_NO_INCLUDE_RAPIDJSON #include "document.h" #include "prettywriter.h" #include "rapidjson.h" @@ -1545,6 +1546,7 @@ class TinyGLTF { #include "writer.h" #endif #endif +#endif #ifdef TINYGLTF_ENABLE_DRACO #include "draco/compression/decode.h" From fb4bd82e2c9008bc08c2a806fbeed12d4d6a8676 Mon Sep 17 00:00:00 2001 From: AlvaroBarua Date: Thu, 18 Mar 2021 18:40:09 +0000 Subject: [PATCH 2/2] Updated Readme.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6d215a3..6297778 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ if (!ret) { * `TINYGLTF_ANDROID_LOAD_FROM_ASSETS`: Load all files from packaged app assets instead of the regular file system. **Note:** You must pass a valid asset manager from your android app to `tinygltf::asset_manager` beforehand. * `TINYGLTF_ENABLE_DRACO`: Enable Draco compression. User must provide include path and link correspnding libraries in your project file. * `TINYGLTF_NO_INCLUDE_JSON `: Disable including `json.hpp` from within `tiny_gltf.h` because it has been already included before or you want to include it using custom path before including `tiny_gltf.h`. +* `TINYGLTF_NO_INCLUDE_RAPIDJSON `: Disable including RapidJson's header files from within `tiny_gltf.h` because it has been already included before or you want to include it using custom path before including `tiny_gltf.h`. * `TINYGLTF_NO_INCLUDE_STB_IMAGE `: Disable including `stb_image.h` from within `tiny_gltf.h` because it has been already included before or you want to include it using custom path before including `tiny_gltf.h`. * `TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE `: Disable including `stb_image_write.h` from within `tiny_gltf.h` because it has been already included before or you want to include it using custom path before including `tiny_gltf.h`. * `TINYGLTF_USE_RAPIDJSON` : Use RapidJSON as a JSON parser/serializer. RapidJSON files are not included in TinyGLTF repo. Please set an include path to RapidJSON if you enable this featrure.