summaryrefslogtreecommitdiffstats
path: root/core/image.cpp
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2020-02-29 19:30:43 -0800
committerclayjohn <claynjohn@gmail.com>2020-02-29 19:46:06 -0800
commit0c3af32d778f742cb2d5049c2f57220f550e3c19 (patch)
tree0a234c14ec33cc615a5e2d4b6a2e778469684704 /core/image.cpp
parentf3c7019177181b65974b93e61c94f70e32b33a9b (diff)
downloadredot-engine-0c3af32d778f742cb2d5049c2f57220f550e3c19.tar.gz
Force mipmaps off when importing RGBA4444 textures
Diffstat (limited to 'core/image.cpp')
-rw-r--r--core/image.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/image.cpp b/core/image.cpp
index a188447f90..2c39c9b882 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -1458,6 +1458,8 @@ Error Image::generate_mipmaps(bool p_renormalize) {
ERR_FAIL_COND_V_MSG(!_can_modify(format), ERR_UNAVAILABLE, "Cannot generate mipmaps in compressed or custom image formats.");
+ ERR_FAIL_COND_V_MSG(format == FORMAT_RGBA4444, ERR_UNAVAILABLE, "Cannot generate mipmaps from RGBA4444 format.");
+
ERR_FAIL_COND_V_MSG(width == 0 || height == 0, ERR_UNCONFIGURED, "Cannot generate mipmaps with width or height equal to 0.");
int mmcount;