From 37ba0ae481244e6e4cb5ff3498235470df083805 Mon Sep 17 00:00:00 2001 From: "Arthur Brainville (Ybalrid)" Date: Fri, 23 Feb 2018 14:23:30 +0100 Subject: [PATCH] Log the types of data used by the currently loaded GLTF file This will help test and improve compatibilitiy. Signed-off by: Arthur Brainville (Ybalrid) --- examples/raytrace/gltf-loader.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/raytrace/gltf-loader.cc b/examples/raytrace/gltf-loader.cc index 57d6a95..176bbee 100644 --- a/examples/raytrace/gltf-loader.cc +++ b/examples/raytrace/gltf-loader.cc @@ -129,7 +129,7 @@ bool LoadGLTF(const std::string &filename, float scale, if (indicesArrayPtr) for (size_t i(0); i < indicesArrayPtr->size(); ++i) { - std::cout << indices[i] << " "; + // std::cout << indices[i] << " "; loadedMesh.faces.push_back(indices[i]); } @@ -139,7 +139,7 @@ bool LoadGLTF(const std::string &filename, float scale, case TINYGLTF_MODE_TRIANGLES: // this is the simpliest case to handle { - std::cout << "Will load a plain old list of trianges\n"; + std::cout << "TRIANGLES\n"; for (const auto &attribute : meshPrimitive.attributes) { const auto attribAccessor = model.accessors[attribute.second]; @@ -284,7 +284,11 @@ bool LoadGLTF(const std::string &filename, float scale, // Other trigangle based modes case TINYGLTF_MODE_TRIANGLE_FAN: + std::cout << "TRIANGLE_FAN\n"; + break; case TINYGLTF_MODE_TRIANGLE_STRIP: + std::cout << "TRIANGLE_STRIP\n"; + break; default: std::cerr << "primitive mode not implemented"; break;