-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenGL无法靠混合GL_BLEND设置整体透明度GL.glColor4f #46
Comments
如果 |
常规的方法比如 |
效果: 代码: 实现了一个 OpenGLCanvas QT 窗口类,可以设置整体透明度 package/main_pyqt5_canvas_opacity.py 原理: 将整个 live2d 作为纹理绘制到一个离屏的帧缓存中,对这个纹理进行透明度处理之后再绘制到屏幕上,完全使用 pyopengl 和 qt 实现。 |
感谢 |
环境
问题描述
GL_BLEND
设置透明度GL.glColor4f
是可以的代码
以下是mian.py的OpenGL初始化内容
我已设置
GL.glColor4f(1, 1, 1, 0.2)
也设置了
GL.glEnable(GL.GL_BLEND)
GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA)
以下为问题图
GL.glColor4f
GL.glColor4f
The text was updated successfully, but these errors were encountered: