aboutsummaryrefslogtreecommitdiffstats
path: root/src/gltf.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2022-09-11 23:43:54 +0200
committerladevieq <ladevie.quentin@gmail.com>2022-09-11 23:43:54 +0200
commit1bb6caa5c8cb97f23f84ac9f3d4aa6c38b6d901c (patch)
tree3fb6d333aba40440ea5dd70382a7a58c727806fe /src/gltf.cpp
parent2d16fbd7e235bf2cc96d451469d8d39cae1917c3 (diff)
Fix materials
Diffstat (limited to 'src/gltf.cpp')
-rw-r--r--src/gltf.cpp2
1 files changed, 1 insertions, 1 deletions
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<std::string>()).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"];