From 1bb6caa5c8cb97f23f84ac9f3d4aa6c38b6d901c Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sun, 11 Sep 2022 23:43:54 +0200 Subject: Fix materials --- src/gltf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gltf.cpp') diff --git a/src/gltf.cpp b/src/gltf.cpp index 64e5644..537e4e1 100644 --- a/src/gltf.cpp +++ b/src/gltf.cpp @@ -118,7 +118,7 @@ void gltf::load_textures(const std::filesystem::path &path) { const auto &gltf_image = gltf_images[image_index]; auto filepath = (path / gltf_image["uri"].get()).string(); auto& image = images[image_index]; - image.data = stbi_load(filepath.c_str(), &image.x, &image.y, &image.n, 4); + image.data = stbi_load(filepath.c_str(), &image.x, &image.y, &image.channels, 4); } // const auto &gltf_samplers = gltf_json["samplers"]; -- cgit v1.3