qgsframegraph: Give names to rubberband objects

This makes it easier to debug the framegraph with the debug overlay.
This commit is contained in:
Jean Felder 2024-06-22 20:17:37 +02:00 committed by Loïc Bartoletti
parent 17bd597eee
commit b362ee62f4

View File

@ -630,6 +630,8 @@ QgsFrameGraph::QgsFrameGraph( QSurface *surface, QSize s, Qt3DRender::QCamera *m
mTransparentObjectsPassLayer = new Qt3DRender::QLayer; mTransparentObjectsPassLayer = new Qt3DRender::QLayer;
mRubberBandsLayer = new Qt3DRender::QLayer; mRubberBandsLayer = new Qt3DRender::QLayer;
mRubberBandsLayer->setObjectName( "mRubberBandsLayer" );
mPreviewLayer->setRecursive( true ); mPreviewLayer->setRecursive( true );
mCastShadowsLayer->setRecursive( true ); mCastShadowsLayer->setRecursive( true );
mForwardRenderLayer->setRecursive( true ); mForwardRenderLayer->setRecursive( true );
@ -654,6 +656,7 @@ QgsFrameGraph::QgsFrameGraph( QSurface *surface, QSize s, Qt3DRender::QCamera *m
// rubber bands (they should be always on top) // rubber bands (they should be always on top)
Qt3DRender::QFrameGraphNode *rubberBandsPass = constructRubberBandsPass(); Qt3DRender::QFrameGraphNode *rubberBandsPass = constructRubberBandsPass();
rubberBandsPass->setObjectName( "rubberBandsPass" );
rubberBandsPass->setParent( mMainViewPort ); rubberBandsPass->setParent( mMainViewPort );
// shadow rendering pass // shadow rendering pass
@ -677,6 +680,7 @@ QgsFrameGraph::QgsFrameGraph( QSurface *surface, QSize s, Qt3DRender::QCamera *m
postprocessingPass->setObjectName( "PostProcessingPass" ); postprocessingPass->setObjectName( "PostProcessingPass" );
mRubberBandsRootEntity = new Qt3DCore::QEntity( mRootEntity ); mRubberBandsRootEntity = new Qt3DCore::QEntity( mRootEntity );
mRubberBandsRootEntity->setObjectName( "mRubberBandsRootEntity" );
mRubberBandsRootEntity->addComponent( mRubberBandsLayer ); mRubberBandsRootEntity->addComponent( mRubberBandsLayer );
// textures preview pass // textures preview pass