mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 10:03:48 +00:00
Hook ASTC decompressor into the rest of FasTC
This commit is contained in:
parent
c6364cc2a7
commit
44ebe5d0bb
2 changed files with 6 additions and 0 deletions
|
@ -79,6 +79,7 @@ ENDIF()
|
|||
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR} )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/ASTCEncoder/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/ETCEncoder/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/DXTEncoder/include )
|
||||
|
||||
|
@ -126,6 +127,7 @@ TARGET_LINK_LIBRARIES( FasTCCore ETCEncoder )
|
|||
TARGET_LINK_LIBRARIES( FasTCCore DXTEncoder )
|
||||
TARGET_LINK_LIBRARIES( FasTCCore BPTCEncoder )
|
||||
TARGET_LINK_LIBRARIES( FasTCCore PVRTCEncoder )
|
||||
TARGET_LINK_LIBRARIES( FasTCCore ASTCEncoder )
|
||||
|
||||
IF( CMAKE_USE_PTHREADS_INIT )
|
||||
TARGET_LINK_LIBRARIES( FasTCCore ${CMAKE_THREAD_LIBS_INIT} )
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
#include "PVRTCCompressor.h"
|
||||
#include "DXTCompressor.h"
|
||||
#include "ETCCompressor.h"
|
||||
#include "ASTCCompressor.h"
|
||||
|
||||
using FasTC::CompressionJob;
|
||||
using FasTC::DecompressionJob;
|
||||
|
@ -136,6 +137,9 @@ bool CompressedImage::DecompressImage(unsigned char *outBuf, unsigned int outBuf
|
|||
#endif
|
||||
} else if(m_Format == FasTC::eCompressionFormat_BPTC) {
|
||||
BPTCC::Decompress(dj);
|
||||
} else if(FasTC::COMPRESSION_FORMAT_ASTC_BEGIN <= m_Format &&
|
||||
FasTC::COMPRESSION_FORMAT_ASTC_END >= m_Format) {
|
||||
ASTCC::Decompress(dj);
|
||||
} else {
|
||||
const char *errStr = "Have not implemented decompression method.";
|
||||
fprintf(stderr, "%s\n", errStr);
|
||||
|
|
Loading…
Reference in a new issue