summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-01-13 15:58:49 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-01-13 15:58:49 +0100
commitc7b701dfd2fc4fe85f5b0f4e94a4faabda8dd375 (patch)
tree54f93e5cb08433963096820a3130addec969bee2 /modules
parent087ffc8b5aafafba8fbb17d0689c0ceb88baa27a (diff)
Image: Include S3TC compression via Squish in non-tools build
We already build Squish in templates build for S3TC decompression, so we can as well expose the compression feature. Fixes #25640.
Diffstat (limited to 'modules')
-rw-r--r--modules/squish/image_compress_squish.cpp2
-rw-r--r--modules/squish/image_compress_squish.h2
-rw-r--r--modules/squish/register_types.cpp2
3 files changed, 0 insertions, 6 deletions
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index ef4ea93e57..58b8115dfc 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -73,7 +73,6 @@ void image_decompress_squish(Image *p_image) {
p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
}
-#ifdef TOOLS_ENABLED
void image_compress_squish(Image *p_image, float p_lossy_quality, Image::CompressSource p_source) {
if (p_image->get_format() >= Image::FORMAT_DXT1)
@@ -203,4 +202,3 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::Compres
p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
}
}
-#endif
diff --git a/modules/squish/image_compress_squish.h b/modules/squish/image_compress_squish.h
index 2666815e47..b5a209ceb9 100644
--- a/modules/squish/image_compress_squish.h
+++ b/modules/squish/image_compress_squish.h
@@ -33,9 +33,7 @@
#include "core/image.h"
-#ifdef TOOLS_ENABLED
void image_compress_squish(Image *p_image, float p_lossy_quality, Image::CompressSource p_source);
-#endif
void image_decompress_squish(Image *p_image);
#endif // IMAGE_COMPRESS_SQUISH_H
diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp
index 1cd551defb..2a0cf82b56 100644
--- a/modules/squish/register_types.cpp
+++ b/modules/squish/register_types.cpp
@@ -33,9 +33,7 @@
void register_squish_types() {
-#ifdef TOOLS_ENABLED
Image::set_compress_bc_func(image_compress_squish);
-#endif
Image::_image_decompress_bc = image_decompress_squish;
}