[Text Server] Clear textures after "generate mipmaps" property change.

This commit is contained in:
bruvzg 2022-09-28 12:43:34 +03:00
parent 92bcd3c01d
commit 51978dde5a
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38
2 changed files with 2 additions and 0 deletions

View File

@ -2035,6 +2035,7 @@ void TextServerAdvanced::font_set_generate_mipmaps(const RID &p_font_rid, bool p
for (KeyValue<Vector2i, FontForSizeAdvanced *> &E : fd->cache) {
for (int i = 0; i < E.value->textures.size(); i++) {
E.value->textures.write[i].dirty = true;
E.value->textures.write[i].texture = Ref<ImageTexture>();
}
}
fd->mipmaps = p_generate_mipmaps;

View File

@ -1129,6 +1129,7 @@ void TextServerFallback::font_set_generate_mipmaps(const RID &p_font_rid, bool p
for (KeyValue<Vector2i, FontForSizeFallback *> &E : fd->cache) {
for (int i = 0; i < E.value->textures.size(); i++) {
E.value->textures.write[i].dirty = true;
E.value->textures.write[i].texture = Ref<ImageTexture>();
}
}
fd->mipmaps = p_generate_mipmaps;