ISPCTextureCompressor.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <Compressors/Compressor.h>
  10. struct bc6h_enc_settings;
  11. struct bc7_enc_settings;
  12. struct astc_enc_settings;
  13. namespace ImageProcessingAtom
  14. {
  15. // ISPC Texture Compressor
  16. class ISPCCompressor
  17. : public ICompressor
  18. {
  19. public:
  20. static bool IsCompressedPixelFormatSupported(EPixelFormat fmt);
  21. static bool IsUncompressedPixelFormatSupported(EPixelFormat fmt);
  22. static bool DoesSupportDecompress(EPixelFormat fmtDst);
  23. static bool IsSourceColorSpaceSupported(ColorSpace colorSpace, EPixelFormat destinationFormat);
  24. ColorSpace GetSupportedColorSpace(EPixelFormat compressFormat) const final;
  25. IImageObjectPtr CompressImage(IImageObjectPtr sourceImage, EPixelFormat destinationFormat, const CompressOption* compressOption) const final;
  26. IImageObjectPtr DecompressImage(IImageObjectPtr sourceImage, EPixelFormat destinationFormat) const final;
  27. const char* GetName() const final;
  28. EPixelFormat GetSuggestedUncompressedFormat(EPixelFormat compressedfmt, EPixelFormat uncompressedfmt) const final;
  29. };
  30. }; // namespace ImageProcessingAtom