mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 09:56:06 +08:00
Compile with json11.cpp
This commit is contained in:
parent
4a35464d9b
commit
9e4a4d5b94
@ -45,6 +45,7 @@ include_directories(
|
|||||||
|
|
||||||
add_executable(glview
|
add_executable(glview
|
||||||
glview.cc
|
glview.cc
|
||||||
|
../../json11.cpp
|
||||||
../common/trackball.cc
|
../common/trackball.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -678,13 +678,13 @@ static void DrawNode(tinygltf::Model &model, const tinygltf::Node &node) {
|
|||||||
// FIXME(syoyo): Refactor.
|
// FIXME(syoyo): Refactor.
|
||||||
// DrawCurves(scene, it->second);
|
// DrawCurves(scene, it->second);
|
||||||
if (node.mesh > -1) {
|
if (node.mesh > -1) {
|
||||||
assert(node.mesh < model.meshes.size());
|
assert(node.mesh < int(model.meshes.size()));
|
||||||
DrawMesh(model, model.meshes[node.mesh]);
|
DrawMesh(model, model.meshes[node.mesh]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw child nodes.
|
// Draw child nodes.
|
||||||
for (size_t i = 0; i < node.children.size(); i++) {
|
for (size_t i = 0; i < node.children.size(); i++) {
|
||||||
assert(node.children[i] < model.nodes.size());
|
assert(node.children[i] < int(model.nodes.size()));
|
||||||
DrawNode(model, model.nodes[node.children[i]]);
|
DrawNode(model, model.nodes[node.children[i]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ solution "glview"
|
|||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
language "C++"
|
language "C++"
|
||||||
cppdialect "C++11"
|
cppdialect "C++11"
|
||||||
files { "glview.cc", "../common/trackball.cc" }
|
files { "glview.cc", "../../json11.cpp", "../common/trackball.cc" }
|
||||||
includedirs { "./" }
|
includedirs { "./" }
|
||||||
includedirs { "../../" }
|
includedirs { "../../" }
|
||||||
includedirs { "../common/" }
|
includedirs { "../common/" }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user