1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Fix issue with external textures being freed by Godot

(cherry picked from commit 5fbc24f3e0)
This commit is contained in:
Bastiaan Olij
2021-12-22 11:46:37 +11:00
committed by Rémi Verschelde
parent a5d7d6ff29
commit 150eb3533b
2 changed files with 4 additions and 0 deletions

View File

@@ -5264,6 +5264,7 @@ void RasterizerStorageGLES2::_render_target_clear(RenderTarget *rt) {
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;
@@ -5428,6 +5429,7 @@ void RasterizerStorageGLES2::render_target_set_external_texture(RID p_render_tar
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;

View File

@@ -6823,6 +6823,7 @@ void RasterizerStorageGLES3::_render_target_clear(RenderTarget *rt) {
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;
@@ -7332,6 +7333,7 @@ void RasterizerStorageGLES3::render_target_set_external_texture(RID p_render_tar
// clean up our texture
Texture *t = texture_owner.get(rt->external.texture);
t->tex_id = 0;
t->alloc_height = 0;
t->alloc_width = 0;
t->width = 0;