rannamal
13th March 2017, 11:33
Consider the opengl under qml scene graph example http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html
Everything works fine until i create a background rectangle of any color with full opacity.
I expect the squircle opengl widget to be shown with the rectangular component as a background but actually the background rectangle is drawn above the squircle and I am not able to see the opengl widget drawn using the shaders.
Actual code :
import QtQuick 2.0
import OpenGLUnderQML 1.0
Item {
width: 320
height: 480
//Actual widget which is drawn using opengl
Squircle {
}
}
Modified Code
import QtQuick 2.0
import OpenGLUnderQML 1.0
Item {
width: 320
height: 480
//Background rectangle which i expect to be shown below the opengl widget
//But actually it gets drawn over the opengl widget
//This is visible by reducing the opacity of the background rectnagle
Rectangle {
anchors.fill: parent
color: "#ffff0000"
}
Squircle {
}
}
Will there be any way to draw any qml components below the opengl widget drawn using QML ?
Everything works fine until i create a background rectangle of any color with full opacity.
I expect the squircle opengl widget to be shown with the rectangular component as a background but actually the background rectangle is drawn above the squircle and I am not able to see the opengl widget drawn using the shaders.
Actual code :
import QtQuick 2.0
import OpenGLUnderQML 1.0
Item {
width: 320
height: 480
//Actual widget which is drawn using opengl
Squircle {
}
}
Modified Code
import QtQuick 2.0
import OpenGLUnderQML 1.0
Item {
width: 320
height: 480
//Background rectangle which i expect to be shown below the opengl widget
//But actually it gets drawn over the opengl widget
//This is visible by reducing the opacity of the background rectnagle
Rectangle {
anchors.fill: parent
color: "#ffff0000"
}
Squircle {
}
}
Will there be any way to draw any qml components below the opengl widget drawn using QML ?