mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-13 21:06:02 +08:00
Fix for when json and stb is aready used in project
This commit is contained in:
parent
326d7ea310
commit
f4b6d11abc
@ -134,6 +134,10 @@ if (!ret) {
|
||||
* `TINYGLTF_NO_EXTERNAL_IMAGE` : Do not try to load external image file. This option woulde be helpful if you do not want load image file during glTF parsing.
|
||||
* `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_BYPASS_INCLUDE_JSON `: Disable including `json.hpp` from within `tiny_gltf.h` (usually because it has been included before).
|
||||
* `TINYGLTF_BYPASS_INCLUDE_STB_IMAGE `: Disable including `stb_image.h` from within `tiny_gltf.h` (usually because it has been included before).
|
||||
* `TINYGLTF_BYPASS_INCLUDE_STB_IMAGE_WRITE `: Disable including `stb_image_write.h` from within `tiny_gltf.h` (usually because it has been included before).
|
||||
|
||||
|
||||
### Saving gltTF 2.0 model
|
||||
* [ ] Buffers.
|
||||
|
10
tiny_gltf.h
10
tiny_gltf.h
@ -1077,7 +1077,9 @@ class TinyGLTF {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef TINYGLTF_BYPASS_INCLUDE_JSON
|
||||
#include "json.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef TINYGLTF_ENABLE_DRACO
|
||||
#include "draco/core/decoder_buffer.h"
|
||||
@ -1085,12 +1087,20 @@ class TinyGLTF {
|
||||
#endif
|
||||
|
||||
#ifndef TINYGLTF_NO_STB_IMAGE
|
||||
#ifndef STB_IMAGE_IMPLEMENTATION
|
||||
#ifndef TINYGLTF_BYPASS_INCLUDE_STB_IMAGE
|
||||
#include "stb_image.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef TINYGLTF_NO_STB_IMAGE_WRITE
|
||||
#ifndef STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#ifndef TINYGLTF_BYPASS_INCLUDE_STB_IMAGE
|
||||
#include "stb_image_write.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
|
Loading…
x
Reference in New Issue
Block a user