Merge pull request #35083 from akien-mga/squish-s3tc-compress-in-template

Image: Include S3TC compression via Squish in non-tools build
This commit is contained in:
Rémi Verschelde 2020-01-13 16:21:30 +01:00 committed by GitHub
commit 031b5455ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 9 deletions

View file

@ -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

View file

@ -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

View file

@ -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;
}

View file

@ -95,7 +95,7 @@ def configure(env):
if not env['builtin_enet']:
env.ParseConfig('pkg-config libenet --cflags --libs')
if not env['builtin_squish'] and env['tools']:
if not env['builtin_squish']:
env.ParseConfig('pkg-config libsquish --cflags --libs')
if not env['builtin_zstd']:

View file

@ -162,7 +162,7 @@ def configure(env):
if not env['builtin_enet']:
env.ParseConfig('pkg-config libenet --cflags --libs')
if not env['builtin_squish'] and env['tools']:
if not env['builtin_squish']:
env.ParseConfig('pkg-config libsquish --cflags --libs')
if not env['builtin_zstd']:

View file

@ -232,7 +232,7 @@ def configure(env):
if not env['builtin_enet']:
env.ParseConfig('pkg-config libenet --cflags --libs')
if not env['builtin_squish'] and env['tools']:
if not env['builtin_squish']:
env.ParseConfig('pkg-config libsquish --cflags --libs')
if not env['builtin_zstd']: