I'm using QT's QGLFramebufferObject for off-screen rendering.
After rendering to the buffer I read the result using glReadPixels()
The problem is that sometimes the background color I read is just 0 (transparent black) and sometimes it is 0xFF000000 (opaque black)
This seem to be related to the time the buffer is initialized. If the buffer is a member of the class inherited from QGLWidget then it is 0. If it is initialized anywhere else it's 0xFF000000.
Does anybody have any idea what's going on here? What is the good expected result of this read?