summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-03-01 08:29:42 +0100
committerGitHub <noreply@github.com>2020-03-01 08:29:42 +0100
commit1ab695bf3732e5918e471231556ce6b5aa3dacdd (patch)
tree49c923a6dc41666b884bbf2ec049a1a1c39e6c42 /core
parent2a15304572516a8df2dabd9561c959832badf60f (diff)
parent0c3af32d778f742cb2d5049c2f57220f550e3c19 (diff)
Merge pull request #36695 from clayjohn/ETC-mipmaps-4
Force mipmaps off when importing RGBA4444 textures
Diffstat (limited to 'core')
-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;