mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-16 04:08:51 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfbec35dc7 | ||
|
|
4ad8c82c9e | ||
|
|
2e7ba45a6c |
@@ -1,7 +1,6 @@
|
||||
//
|
||||
// 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
3186
minijson.h
File diff suppressed because it is too large
Load Diff
BIN
tests/issue-492.glb
Normal file
BIN
tests/issue-492.glb
Normal file
Binary file not shown.
@@ -1182,3 +1182,21 @@ 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,9 +1721,6 @@ 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
|
||||
@@ -1735,7 +1732,6 @@ class TinyGLTF {
|
||||
#include "writer.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif // !TINYGLTF_USE_MINIJSON
|
||||
#endif
|
||||
|
||||
#ifdef TINYGLTF_ENABLE_DRACO
|
||||
@@ -5664,7 +5660,7 @@ static bool ParseSkin(Skin *skin, std::string *err, const detail::json &o,
|
||||
skin->skeleton = skeleton;
|
||||
|
||||
int invBind = -1;
|
||||
ParseIntegerProperty(&invBind, err, o, "inverseBindMatrices", true, "Skin");
|
||||
ParseIntegerProperty(&invBind, err, o, "inverseBindMatrices", false, "Skin");
|
||||
skin->inverseBindMatrices = invBind;
|
||||
|
||||
ParseExtrasAndExtensions(skin, err, o,
|
||||
|
||||
Reference in New Issue
Block a user