diff --git a/impeller/fixtures/BUILD.gn b/impeller/fixtures/BUILD.gn index a52d020d65bfb..7c8fe01a79e2f 100644 --- a/impeller/fixtures/BUILD.gn +++ b/impeller/fixtures/BUILD.gn @@ -34,7 +34,10 @@ impeller_shaders("shader_fixtures") { } scenec("scene_fixtures") { - geometry = [ "flutter_logo.glb" ] + geometry = [ + "flutter_logo.glb", + "two_triangles.glb", + ] type = "gltf" } @@ -79,6 +82,7 @@ test_fixtures("file_fixtures") { "table_mountain_py.png", "table_mountain_pz.png", "test_texture.frag", + "two_triangles.glb", "types.h", "wtf.otf", ] diff --git a/impeller/fixtures/two_triangles.glb b/impeller/fixtures/two_triangles.glb new file mode 100644 index 0000000000000..3937ac6969769 Binary files /dev/null and b/impeller/fixtures/two_triangles.glb differ diff --git a/impeller/scene/importer/importer_gltf.cc b/impeller/scene/importer/importer_gltf.cc index 74b7e57f579f4..b16c687270389 100644 --- a/impeller/scene/importer/importer_gltf.cc +++ b/impeller/scene/importer/importer_gltf.cc @@ -189,7 +189,7 @@ static void ProcessNode(const tinygltf::Model& gltf, /// Children. /// - for (size_t node_i = 0; node_i < out_node.children.size(); node_i++) { + for (size_t node_i = 0; node_i < in_node.children.size(); node_i++) { auto child = std::make_unique(); ProcessNode(gltf, gltf.nodes[in_node.children[node_i]], *child); out_node.children.push_back(std::move(child));