Skip to content

Commit

Permalink
#4201 need to clear fbo before pasting over it
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Aug 13, 2024
1 parent 28f3c30 commit ae957f2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xpra/client/gl/gl_window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,13 @@ def copy_fbo(self, w : int, h : int, sx : int=0, sy : int=0, dx : int=0, dy : in

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, self.tmp_fbo)
glBindTexture(target, self.textures[TEX_TMP_FBO])
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, target, self.textures[TEX_TMP_FBO], 0)
glDrawBuffer(GL_COLOR_ATTACHMENT1)
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, target, self.textures[TEX_TMP_FBO], 0)
glDrawBuffer(GL_COLOR_ATTACHMENT0)
if self._alpha_enabled:
glClearColor(0, 0, 0, 1)
else:
glClearColor(1, 1, 1, 0)
glClear(GL_COLOR_BUFFER_BIT)

glBlitFramebuffer(sx, sy, sx+w, sy+h,
dx, dy, dx+w, dy+h,
Expand Down

0 comments on commit ae957f2

Please sign in to comment.