mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-25 08:38:52 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b5fc0cb31 |
@@ -1,6 +1,7 @@
|
||||
//
|
||||
// TODO(syoyo): Print extensions and extras for each glTF object.
|
||||
//
|
||||
#include <iostream>
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
|
||||
3186
minijson.h
Normal file
3186
minijson.h
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1182,21 +1182,3 @@ TEST_CASE("images-as-is", "[issue-487]") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("inverse-bind-matrices-optional", "[issue-492]") {
|
||||
tinygltf::Model model;
|
||||
tinygltf::TinyGLTF ctx;
|
||||
std::string err;
|
||||
std::string warn;
|
||||
|
||||
bool ret = ctx.LoadBinaryFromFile(&model, &err, &warn, "issue-492.glb");
|
||||
if (!warn.empty()) {
|
||||
std::cout << "WARN:" << warn << std::endl;
|
||||
}
|
||||
if (!err.empty()) {
|
||||
std::cerr << "ERR:" << err << std::endl;
|
||||
}
|
||||
|
||||
REQUIRE(true == ret);
|
||||
REQUIRE(err.empty());
|
||||
}
|
||||
@@ -1721,6 +1721,9 @@ class TinyGLTF {
|
||||
#endif // __GNUC__
|
||||
|
||||
#ifndef TINYGLTF_NO_INCLUDE_JSON
|
||||
#ifdef TINYGLTF_USE_MINIJSON
|
||||
#include "minijson.h"
|
||||
#else // !TINYGLTF_USE_MINIJSON
|
||||
#ifndef TINYGLTF_USE_RAPIDJSON
|
||||
#include "json.hpp"
|
||||
#else
|
||||
@@ -1732,6 +1735,7 @@ class TinyGLTF {
|
||||
#include "writer.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif // !TINYGLTF_USE_MINIJSON
|
||||
#endif
|
||||
|
||||
#ifdef TINYGLTF_ENABLE_DRACO
|
||||
@@ -5660,7 +5664,7 @@ static bool ParseSkin(Skin *skin, std::string *err, const detail::json &o,
|
||||
skin->skeleton = skeleton;
|
||||
|
||||
int invBind = -1;
|
||||
ParseIntegerProperty(&invBind, err, o, "inverseBindMatrices", false, "Skin");
|
||||
ParseIntegerProperty(&invBind, err, o, "inverseBindMatrices", true, "Skin");
|
||||
skin->inverseBindMatrices = invBind;
|
||||
|
||||
ParseExtrasAndExtensions(skin, err, o,
|
||||
|
||||
Reference in New Issue
Block a user