Alpha values in GLViewWidget

35 views
Skip to first unread message

Lucas Wilkins

unread,
Oct 26, 2022, 4:53:00 PM10/26/22
to pyqtgraph
Hi, I've been building a scene and I would like to make some of the GLMeshItems tranlucent.  I have set the alpha values in the colour array to 0.5, but they draw solid.

I have also tried to enable alpha mixing via

... = gl.GLViewWidget()
glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA)
glEnable(GL_BLEND)
glEnable(GL_COLOR_MATERIAL)

but this gives a GL error message:

 OpenGL.error.GLError: GLError(
    err = 1282,
    description = b'invalid operation',
    baseOperation = glBlendFunc,
    cArguments = (GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA)
)

Any idea about how to get this working?

Thanks,
Lucas
Reply all
Reply to author
Forward
0 new messages