diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2022-09-11 23:43:54 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2022-09-11 23:43:54 +0200 |
| commit | 1bb6caa5c8cb97f23f84ac9f3d4aa6c38b6d901c (patch) | |
| tree | 3fb6d333aba40440ea5dd70382a7a58c727806fe /src/gltf.cpp | |
| parent | 2d16fbd7e235bf2cc96d451469d8d39cae1917c3 (diff) | |
Fix materials
Diffstat (limited to 'src/gltf.cpp')
| -rw-r--r-- | src/gltf.cpp | 2 |
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"]; |
