diff --git a/playground/parrots/Overlay.cpp b/playground/parrots/Overlay.cpp index 5dc0ef44..4f02563e 100644 --- a/playground/parrots/Overlay.cpp +++ b/playground/parrots/Overlay.cpp @@ -82,7 +82,6 @@ namespace case BorderRole: return updateBoxNode( skinnable, node, Overlay::Panel ); - break; }; return nullptr; @@ -123,10 +122,9 @@ namespace else { clipNode = updateBoxClipNode( overlay, clipNode, Q::Panel ); + QskSGNode::setParentNode( textureNode, clipNode ); } - QskSGNode::setParentNode( textureNode, clipNode ); - return clipNode ? clipNode : textureNode; } diff --git a/playground/parrots/shaders.qrc b/playground/parrots/shaders.qrc index 98ade156..15150193 100644 --- a/playground/parrots/shaders.qrc +++ b/playground/parrots/shaders.qrc @@ -3,10 +3,10 @@ shaders/blur.vert shaders/blur.frag + shaders/rgbswap.frag shaders/blur.vert.qsb shaders/blur.frag.qsb - shaders/rgbswap.frag.qsb diff --git a/playground/parrots/shaders/rgbswap-vulkan.frag b/playground/parrots/shaders/rgbswap-vulkan.frag index f53a2139..f2ecec16 100644 --- a/playground/parrots/shaders/rgbswap-vulkan.frag +++ b/playground/parrots/shaders/rgbswap-vulkan.frag @@ -14,5 +14,5 @@ layout( std140, binding = 0 ) uniform buf void main() { vec4 c = texture( source, coord ); - fragColor = c.yzxw * ubuf.opacity;; + fragColor = c.yzxw * ubuf.opacity; } diff --git a/playground/parrots/shaders/rgbswap.frag b/playground/parrots/shaders/rgbswap.frag new file mode 100644 index 00000000..a657c80b --- /dev/null +++ b/playground/parrots/shaders/rgbswap.frag @@ -0,0 +1,10 @@ +uniform sampler2D source; +uniform lowp float opacity; + +varying highp vec2 coord; + +void main() +{ + vec4 c = texture2D( source, coord ); + gl_FragColor = c.yzxw * opacity; +} diff --git a/src/nodes/QskSceneTexture.cpp b/src/nodes/QskSceneTexture.cpp index e4d78d78..0b733b74 100644 --- a/src/nodes/QskSceneTexture.cpp +++ b/src/nodes/QskSceneTexture.cpp @@ -75,7 +75,7 @@ namespace QskSceneTexture* m_texture = nullptr; #if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) - QOpenGLFramebufferObject* m_fbo; + QOpenGLFramebufferObject* m_fbo = nullptr; #endif #if QT_VERSION < QT_VERSION_CHECK( 6, 4, 0 )