update examples with new defines

This commit is contained in:
johan bowald 2018-04-01 13:44:48 +02:00
parent 0894de77f9
commit ef151a4fed
3 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@
#include <iostream>
#include <memory> // c++11
#define TINYGLTF_IMPLEMENTATION
#define TINYGLTF_NO_STB_IMAGE_WRITE
#include <tiny_gltf.h>
namespace example {

View File

@ -1,5 +1,6 @@
#define TINYGLTF_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "tiny_gltf.h"
#include <cstdio>

View File

@ -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";
}