diff --git a/src/nvtt/CompressionOptions.h b/src/nvtt/CompressionOptions.h index d9caba8..a340cda 100644 --- a/src/nvtt/CompressionOptions.h +++ b/src/nvtt/CompressionOptions.h @@ -46,7 +46,7 @@ namespace nvtt uint bmask; uint amask; - bool useCuda; + mutable bool useCuda; nv::String externalCompressor; diff --git a/src/nvtt/nvtt.cpp b/src/nvtt/nvtt.cpp index f961c62..c8c54f9 100644 --- a/src/nvtt/nvtt.cpp +++ b/src/nvtt/nvtt.cpp @@ -673,6 +673,9 @@ static bool compress(const InputOptions::Private & inputOptions, const OutputOpt /// Compress the input texture with the given compression options. bool Compressor::process(const InputOptions & inputOptions, const CompressionOptions & compressionOptions, const OutputOptions & outputOptions) const { + // @@ Hack! + compressionOptions.m.useCuda = this->m.cudaEnabled; + return ::compress(inputOptions.m, outputOptions.m, compressionOptions.m); }