From 66c1063995573c608ca9f7284f37a9b9b6925d96 Mon Sep 17 00:00:00 2001 From: r-lyeh Date: Mon, 29 Aug 2016 16:56:18 +0200 Subject: [PATCH] Fix .glb loading (Windows) Fixes loading of https://github.com/KhronosGroup/glTF/blob/master/sampleModels/Duck/glTF-Binary/Duck.glb --- tiny_gltf_loader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf_loader.h b/tiny_gltf_loader.h index 1d1b9dc..3746ac8 100644 --- a/tiny_gltf_loader.h +++ b/tiny_gltf_loader.h @@ -2401,7 +2401,7 @@ bool TinyGLTFLoader::LoadBinaryFromFile(Scene *scene, std::string *err, unsigned int check_sections) { std::stringstream ss; - std::ifstream f(filename.c_str()); + std::ifstream f(filename.c_str(), std::ios::binary); if (!f) { ss << "Failed to open file: " << filename << std::endl; if (err) {