ImageImporter.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (C) 2009-2021, 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. GenericMemoryPoolAllocator<U8> m_allocator;
  18. ConstWeakArray<CString> m_inputFilenames;
  19. CString m_outFilename;
  20. ImageBinaryType m_type = ImageBinaryType::_2D;
  21. ImageBinaryDataCompression m_compressions = ImageBinaryDataCompression::S3TC;
  22. U32 m_minMipmapDimension = 4;
  23. U32 m_mipmapCount = MAX_U32;
  24. Bool m_noAlpha = true;
  25. CString m_tempDirectory;
  26. CString m_compressonatorPath; ///< Optional.
  27. CString m_astcencPath; ///< Optional.
  28. UVec2 m_astcBlockSize = UVec2(8u);
  29. };
  30. /// Converts images to AnKi's specific format.
  31. ANKI_USE_RESULT Error importImage(const ImageImporterConfig& config);
  32. /// @}
  33. } // end namespace anki