ImageImporter.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Importer/Common.h>
  6. #include <AnKi/Util/String.h>
  7. #include <AnKi/Util/WeakArray.h>
  8. #include <AnKi/Resource/ImageBinary.h>
  9. namespace anki {
  10. /// @addtogroup importer
  11. /// @{
  12. /// Config for importImage().
  13. /// @relates importImage.
  14. class ImageImporterConfig
  15. {
  16. public:
  17. ConstWeakArray<CString> m_inputFilenames;
  18. CString m_outFilename;
  19. ImageBinaryType m_type = ImageBinaryType::k2D;
  20. ImageBinaryDataCompression m_compressions = ImageBinaryDataCompression::kS3tc;
  21. U32 m_minMipmapDimension = 4;
  22. U8 m_mipmapCount = kMaxU8;
  23. Bool m_noAlpha = true;
  24. CString m_tempDirectory;
  25. CString m_compressonatorFilename; ///< Optional.
  26. CString m_astcencFilename; ///< Optional.
  27. Vec3 m_hdrScale = Vec3(1.0f); ///< Scale the values of HDR textures.
  28. Vec3 m_hdrBias = Vec3(0.0f); ///< Add that value to the HDR textures.
  29. UVec2 m_astcBlockSize = UVec2(8u);
  30. Bool m_sRgbToLinear = false;
  31. Bool m_linearToSRgb = false;
  32. Bool m_flipImage = false;
  33. };
  34. /// Converts images to AnKi's specific format.
  35. Error importImage(const ImageImporterConfig& config);
  36. /// @}
  37. } // end namespace anki