mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-08 11:13:50 +00:00
Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a570c88d9 | ||
|
|
e12e0a9392 | ||
|
|
879cb473a3 | ||
|
|
c9657be1de | ||
|
|
95bbf15ce2 | ||
|
|
78864c8d3a | ||
|
|
14c86324d7 | ||
|
|
8d5d0b34be | ||
|
|
a1a34cb54d | ||
|
|
cfe64fb6c8 | ||
|
|
c201efb998 | ||
|
|
b88e9cc52a | ||
|
|
9417144f48 | ||
|
|
07616e8190 | ||
|
|
bec8a6d54f | ||
|
|
157063fa1b | ||
|
|
c164878d0f | ||
|
|
d852f50d49 | ||
|
|
22cafa1032 | ||
|
|
47208b234d | ||
|
|
5a6df34d99 | ||
|
|
147a00a601 | ||
|
|
350c296802 | ||
|
|
cc93e1fd25 | ||
|
|
59cc44ad4f | ||
|
|
1a5046e06b | ||
|
|
877d856e71 | ||
|
|
b534b6b0d8 | ||
|
|
ecfd37dee2 | ||
|
|
5c06b7d03b | ||
|
|
a75355b018 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,6 +24,7 @@ premake5.tar.gz
|
||||
#binary directories
|
||||
bin/
|
||||
obj/
|
||||
out/
|
||||
|
||||
#runtime gui config
|
||||
imgui.ini
|
||||
|
||||
@@ -197,6 +197,7 @@ if (!ret) {
|
||||
* `TINYGLTF_USE_RAPIDJSON` : Use RapidJSON as a JSON parser/serializer. RapidJSON files are not included in TinyGLTF repo. Please set an include path to RapidJSON if you enable this feature.
|
||||
* `TINYGLTF_USE_CPP14` : Use C++14 feature(requires C++14 compiler). This may give better performance than C++11.
|
||||
|
||||
|
||||
## CMake options
|
||||
|
||||
You can add tinygltf using `add_subdirectory` feature.
|
||||
|
||||
1
tests/issue-416.gltf
Normal file
1
tests/issue-416.gltf
Normal file
@@ -0,0 +1 @@
|
||||
{"images":[{"uri":"%!QAAAQAAA5"}],"asset":{"version":""}}
|
||||
@@ -721,3 +721,39 @@ TEST_CASE("serialize-image-failure", "[issue-394]") {
|
||||
REQUIRE(false == result);
|
||||
REQUIRE(os.str().size() == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("filesize-check", "[issue-416]") {
|
||||
|
||||
tinygltf::Model model;
|
||||
tinygltf::TinyGLTF ctx;
|
||||
std::string err;
|
||||
std::string warn;
|
||||
|
||||
ctx.SetMaxExternalFileSize(10); // 10 bytes. will fail to load texture image.
|
||||
|
||||
bool ret = ctx.LoadASCIIFromFile(&model, &err, &warn, "../models/Cube/Cube.gltf");
|
||||
if (!err.empty()) {
|
||||
std::cerr << err << std::endl;
|
||||
}
|
||||
|
||||
REQUIRE(false == ret);
|
||||
}
|
||||
|
||||
TEST_CASE("load-issue-416-model", "[issue-416]") {
|
||||
|
||||
tinygltf::Model model;
|
||||
tinygltf::TinyGLTF ctx;
|
||||
std::string err;
|
||||
std::string warn;
|
||||
|
||||
bool ret = ctx.LoadASCIIFromFile(&model, &err, &warn, "issue-416.gltf");
|
||||
if (!warn.empty()) {
|
||||
std::cout << "WARN:" << warn << std::endl;
|
||||
}
|
||||
if (!err.empty()) {
|
||||
std::cerr << "ERR:" << err << std::endl;
|
||||
}
|
||||
|
||||
// external file load fails, but reading glTF itself is ok.
|
||||
REQUIRE(true == ret);
|
||||
}
|
||||
|
||||
1556
tiny_gltf.h
1556
tiny_gltf.h
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user