Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make alpha blending works when drawing plate type.

  • Loading branch information...
commit c7fc602dfe8e6a4d818be44d7ff0172a4f34a50c 1 parent 32bf952
Hsuyao Tsai authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/python/rs274/glcanon.py
View
4 lib/python/rs274/glcanon.py
@@ -1256,6 +1256,8 @@ def redraw(self):
# print 'x1(%f) y1(%f)' % (pos_1[0], pos_1[1])
# print 'x2(%f) y2(%f)' % (pos_2[0], pos_2[1])
# print 'x3(%f) y3(%f)' % (pos_3[0], pos_3[1])
+ glDisable(GL_DEPTH_TEST)
+ glEnable(GL_BLEND)
glLineWidth(10)
glColor3f(0.4,0.4,0.2)
# glColor3f(0.5,1.0,0.2)
@@ -1266,6 +1268,8 @@ def redraw(self):
glVertex3f(pos_1[0], pos_1[1],0)
glEnd()
+ glEnable(GL_DEPTH_TEST)
+ glDisable(GL_BLEND)
else:
# print 'PLATEVIEW: glcanon does not want to draw'
pass
Please sign in to comment.
Something went wrong with that request. Please try again.