From 5ac923004fe4de29499919ce796982dc1db006a0 Mon Sep 17 00:00:00 2001 From: darkfi Date: Mon, 22 Dec 2025 15:01:17 -0300 Subject: [PATCH] gl: On Android when resizing the screen, visual tearing may occur on some devices since clearing the screen is clipped by scissor. So disable it when cleaning up the render pass. --- src/graphics/gl.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/graphics/gl.rs b/src/graphics/gl.rs index 9c8c9844..5fb34c09 100644 --- a/src/graphics/gl.rs +++ b/src/graphics/gl.rs @@ -1709,6 +1709,11 @@ impl RenderingBackend for GlContext { glBindFramebuffer(GL_FRAMEBUFFER, self.default_framebuffer); self.cache.bind_buffer(GL_ARRAY_BUFFER, 0, None); self.cache.bind_buffer(GL_ELEMENT_ARRAY_BUFFER, 0, None); + + // On Android when resizing the screen, visual tearing may occur + // on some devices since clearing the screen is clipped by scissor. + // So disable it when cleaning up the render pass. + glDisable(GL_SCISSOR_TEST); } }