Hook ASTC decompressor into the rest of FasTC

This commit is contained in:
Pavel Krajcevski 2014-03-12 19:41:48 -04:00
parent c6364cc2a7
commit 44ebe5d0bb
2 changed files with 6 additions and 0 deletions

View file

@ -79,6 +79,7 @@ ENDIF()
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR} ) INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR} )
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/ASTCEncoder/include )
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/ETCEncoder/include ) INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/ETCEncoder/include )
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/DXTEncoder/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 DXTEncoder )
TARGET_LINK_LIBRARIES( FasTCCore BPTCEncoder ) TARGET_LINK_LIBRARIES( FasTCCore BPTCEncoder )
TARGET_LINK_LIBRARIES( FasTCCore PVRTCEncoder ) TARGET_LINK_LIBRARIES( FasTCCore PVRTCEncoder )
TARGET_LINK_LIBRARIES( FasTCCore ASTCEncoder )
IF( CMAKE_USE_PTHREADS_INIT ) IF( CMAKE_USE_PTHREADS_INIT )
TARGET_LINK_LIBRARIES( FasTCCore ${CMAKE_THREAD_LIBS_INIT} ) TARGET_LINK_LIBRARIES( FasTCCore ${CMAKE_THREAD_LIBS_INIT} )

View file

@ -64,6 +64,7 @@
#include "PVRTCCompressor.h" #include "PVRTCCompressor.h"
#include "DXTCompressor.h" #include "DXTCompressor.h"
#include "ETCCompressor.h" #include "ETCCompressor.h"
#include "ASTCCompressor.h"
using FasTC::CompressionJob; using FasTC::CompressionJob;
using FasTC::DecompressionJob; using FasTC::DecompressionJob;
@ -136,6 +137,9 @@ bool CompressedImage::DecompressImage(unsigned char *outBuf, unsigned int outBuf
#endif #endif
} else if(m_Format == FasTC::eCompressionFormat_BPTC) { } else if(m_Format == FasTC::eCompressionFormat_BPTC) {
BPTCC::Decompress(dj); BPTCC::Decompress(dj);
} else if(FasTC::COMPRESSION_FORMAT_ASTC_BEGIN <= m_Format &&
FasTC::COMPRESSION_FORMAT_ASTC_END >= m_Format) {
ASTCC::Decompress(dj);
} else { } else {
const char *errStr = "Have not implemented decompression method."; const char *errStr = "Have not implemented decompression method.";
fprintf(stderr, "%s\n", errStr); fprintf(stderr, "%s\n", errStr);