Issue
I am trying to use
gl.GLMeshItem(vertexes=sel_vertices, faces=sel_face_idx, faceColors=colors,
drawEdges=True, edgeColor=colors)
to plot faces of selected vertices of triangles. The color includes four elements for RGBA, I tried to change the fourth element to change the transparent but there is no effect.
I also read several threads. Someone suggested:
from OpenGL.GL import *
glBlendFunc (GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA)
glEnable (GL_BLEND)
glEnable (GL_COLOR_MATERIAL)
However, the problem still cannot be solved. How could I do that?
Solution
the following lines should be added after initializing the widget view, i.e.:
gl.GLViewWidget()
glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA)
glEnable(GL_BLEND)
glEnable(GL_COLOR_MATERIAL)
Answered By - Karim
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.