Skip to content

Commit

Permalink
fixup r15570:
Browse files Browse the repository at this point in the history
* use line-width var for consistency
* planar paint changes the active texture, we must re-set it afterwards!

git-svn-id: https://xpra.org/svn/Xpra/trunk@15575 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 12, 2017
1 parent 3400b7a commit 5b17dc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xpra/client/gl/gl_window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ def draw_pointer(self):
#paint a fake one:
alpha = max(0, (5.0-elapsed)/5.0)
lw = 2
glLineWidth(2)
glLineWidth(lw)
glBegin(GL_LINES)
glColor4f(0, 0, 0, alpha)
glVertex2i(x-size, y-lw//2)
Expand Down Expand Up @@ -1073,6 +1073,7 @@ def update_planar_textures(self, x, y, width, height, img, pixel_format, scaling
pass
glTexSubImage2D(target, 0, 0, 0, width//div_w, height//div_h, GL_LUMINANCE, GL_UNSIGNED_BYTE, pixel_data)
glBindTexture(target, 0)
#glActiveTexture(GL_TEXTURE0) #redundant, we always call render_planar_update afterwards

def render_planar_update(self, rx, ry, rw, rh, x_scale=1, y_scale=1):
log("%s.render_planar_update%s pixel_format=%s", self, (rx, ry, rw, rh, x_scale, y_scale), self.pixel_format)
Expand Down Expand Up @@ -1107,3 +1108,4 @@ def render_planar_update(self, rx, ry, rw, rh, x_scale=1, y_scale=1):
if self.pixel_format == "GBRP":
# Reset state to our default (YUV painting)
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, self.shaders[YUV2RGB_SHADER])
glActiveTexture(GL_TEXTURE0)

0 comments on commit 5b17dc2

Please sign in to comment.