I call
gl.glClearColor(*[ 0., 0., 0.0, a])
gl.glClear(gl.GL_COLOR_BUFFER_BIT)
gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
Then I draw my scene.
If a
is zero, it appears that nothing is cleared and the buffer appears to be stuff from other framebuffers. If a
is one, the buffer appears clear, but when I blend in rectangles, I start to see stuff from other framebuffers.
Why is this and how can I fix it?
I have specified 0 depht buffer bits and 8 alpha buffer bits:
gl_format = QSurfaceFormat()
gl_format.setVersion(4, 1)
gl_format.setAlphaBufferSize(8)
gl_format.setDepthBufferSize(0)
gl_format.setProfile(QSurfaceFormat.CoreProfile)
gl_format.setSamples(8)