Skip to content

Commit

Permalink
Basis{ImageConverter,Importer}: add support for basis_universal 1.50
Browse files Browse the repository at this point in the history
  • Loading branch information
pezcode committed Sep 11, 2024
1 parent 6ed5285 commit a6d8016
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/FindBasisUniversal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ foreach(_component ${BasisUniversal_FIND_COMPONENTS})
lodepng.cpp
# Added in 1.16
basisu_opencl.cpp
pvpngreader.cpp)
pvpngreader.cpp
# Added in 1.50
basisu_astc_hdr_enc.cpp
3rdparty/android_astc_decomp.cpp
3rdparty/tinyexr.cpp)
# Disable the find root path here, it overrides the
# CMAKE_FIND_ROOT_PATH_MODE_INCLUDE setting potentially set in
# toolchains.
Expand Down
4 changes: 4 additions & 0 deletions src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ template<UnsignedInt dimensions> Containers::Optional<Containers::Array<char>> c
/* If these are enabled, the library reads BMPs/JPGs/PNGs/TGAs from the
filesystem and then writes basis files there also. DO NOT WANT. */
params.m_read_source_images = false;
#if BASISU_LIB_VERSION >= 150
params.m_write_output_basis_or_ktx2_files = false;
#else
params.m_write_output_basis_files = false;
#endif
/* One image per slice. The base mip is in m_source_images, mip 1 and
higher go into m_source_mipmap_images. */
const UnsignedInt numImages = Vector3i::pad(baseSize, 1).z();
Expand Down

0 comments on commit a6d8016

Please sign in to comment.