I am using QQuickFramebufferObject in QML to draw OpenGL code. I found a couple of ways to make OpenGL with QML, one of which (in the Qt Squircle example) is to draw all OpenGLs either below everything or above everything, but I use the QQuickFramebufferObject method because I need regular QML objects like above and below the object created by OpenGL.
All OpenGL code works fine. The background of the QQuickFramebufferObject must be transparent so that QML objects can be seen. (My QQuickFramebufferObject draws an abstract shape.) However, QQuickFramebufferObject seems to lock its rectangle on the screen and show nothing below it. I tried
glClearColor( 0.0, 0.0, 0.0, 0.0f ); glClear( GL_COLOR_BUFFER_BIT );
so that the background is transparent, but instead I just got a white rectangle. Even if I miss the call to FBO rendering as a whole, it still draws everything, so I think this is something outside of OpenGL code and how QML handles FBO.
What I want:

What I get:

source share