[Interest] SceneGraph clearing buffers

Sean Harmer sean.harmer at kdab.com
Fri Apr 7 11:10:38 CEST 2017

On 07/04/2017 03:59, Russell, Matthew wrote:
> Hi
> Is there a way to have a scene graph (called on beforeRendering) clear the buffers of a Scene3d on top of it?
> i.e. I have a scene graph under my QML (similar to the Squircle example) where I call glClearColor, and a Scene3d with a RenderSurfaceSelector.
> glClearColor clears the scene graphs buffers, but doesn't touch the buffers from the RenderSurfaceSelector.
> Before the scene graph, I was using ClearBuffers in my RenderSurfaceSelector, but now that paints over my scene graph.  The only way I can get it working is to use a clear colour with a zero alpha.. It works but it just seems wrong.
> Is there a better way to clear my buffers?  Or maybe I'm just doing something completely wrong, e.g. should I be using a stencil or something?

Can you post a small compilable example of what you have please, 
including your frame graph. It could be that the render target is not 
set when glClearBUffers() is called causing it to clear the default 
framebuffer rather than the FBO. I'm not sure if this is a 
misconfiguration or a bug without seeing the code though.



> Thanks
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts

More information about the Interest mailing list