diff --git a/examples/raytrace/gltf-loader.cc b/examples/raytrace/gltf-loader.cc index 8015913..dd32532 100644 --- a/examples/raytrace/gltf-loader.cc +++ b/examples/raytrace/gltf-loader.cc @@ -3,6 +3,7 @@ #include #include // c++11 #define TINYGLTF_IMPLEMENTATION +#define TINYGLTF_NO_STB_IMAGE_WRITE #include namespace example { diff --git a/loader_example.cc b/loader_example.cc index 139e956..fdd88a8 100644 --- a/loader_example.cc +++ b/loader_example.cc @@ -1,5 +1,6 @@ #define TINYGLTF_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION +#define STB_IMAGE_WRITE_IMPLEMENTATION #include "tiny_gltf.h" #include diff --git a/tiny_gltf.h b/tiny_gltf.h index 5932379..9f3703d 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -2034,8 +2034,8 @@ static bool ParseBuffer(Buffer *buffer, std::string *err, const json &o, } else { if (IsDataURI(buffer->uri)) { - if (!DecodeDataURI(&buffer->data, std::string(), buffer->uri, bytes, - true)) { + std::string mime_type; + if (!DecodeDataURI(&buffer->data, mime_type, buffer->uri, bytes, true)) { if (err) { (*err) += "Failed to decode 'uri' : " + buffer->uri + " in Buffer\n"; }