From 96b2743782ea740b48fa67f729630c3d43b78b6b Mon Sep 17 00:00:00 2001 From: clayjohn Date: Thu, 15 Jun 2023 13:08:55 -0700 Subject: [PATCH] Ensure filter/repeat is cached by Viewport texture in GL Compatibility renderer --- drivers/gles3/storage/texture_storage.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index c4fef89cfd2..4ad7b8970a5 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -1698,10 +1698,8 @@ void TextureStorage::_update_render_target(RenderTarget *rt) { glTexImage2D(texture_target, 0, rt->color_internal_format, rt->size.x, rt->size.y, 0, rt->color_format, rt->color_type, nullptr); } - glTexParameteri(texture_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(texture_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + texture->gl_set_filter(RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST); + texture->gl_set_repeat(RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); } #ifndef IOS_ENABLED if (use_multiview) {