From 350dc1910866bf02ced674f29e618b2079a05017 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 5 May 2019 21:26:41 +0200 Subject: [PATCH] ui/app/internal/gl: invalidate the correct fbo in sRGB fallback Signed-off-by: Elias Naur --- ui/app/internal/gl/srgb.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/app/internal/gl/srgb.go b/ui/app/internal/gl/srgb.go index dc965c8e..25ba3df0 100644 --- a/ui/app/internal/gl/srgb.go +++ b/ui/app/internal/gl/srgb.go @@ -83,10 +83,12 @@ func (s *SRGBFBO) Blit() { s.c.BindTexture(TEXTURE_2D, 0) s.c.DisableVertexAttribArray(0) s.c.DisableVertexAttribArray(1) + s.c.BindFramebuffer(FRAMEBUFFER, s.frameBuffer) s.c.InvalidateFramebuffer(FRAMEBUFFER, COLOR_ATTACHMENT0) s.c.InvalidateFramebuffer(FRAMEBUFFER, DEPTH_ATTACHMENT) // The Android emulator requires framebuffer 0 bound at eglSwapBuffer time. - // Bind the default sRGB framebuffer in afterPresent. + // Bind the sRGB framebuffer again in afterPresent. + s.c.BindFramebuffer(FRAMEBUFFER, Framebuffer{}) } func (s *SRGBFBO) AfterPresent() {