Skip to content
Permalink
Browse files

Fix leak of QgsShadowRenderingFrameGraph, QParameter leaks

  • Loading branch information
nyalldawson committed Nov 6, 2020
1 parent 60eaaa7 commit 465f2d91497f1d007234ca368d791d66a346d6f6
@@ -124,8 +124,8 @@ QgsPostprocessingEntity::QgsPostprocessingEntity( QgsShadowRenderingFrameGraph *
mShadowBiasParameter = new Qt3DRender::QParameter( "shadowBias", QVariant::fromValue( 0.00001f ) );
mMaterial->addParameter( mShadowBiasParameter );

mLightPosition = new Qt3DRender::QParameter( "lightPosition", QVariant::fromValue( QVector3D() ) );
mLightDirection = new Qt3DRender::QParameter( "lightDirection", QVariant::fromValue( QVector3D() ) );
mLightPosition = new Qt3DRender::QParameter( "lightPosition", QVariant::fromValue( QVector3D() ), this );
mLightDirection = new Qt3DRender::QParameter( "lightDirection", QVariant::fromValue( QVector3D() ), this );

mEffect = new Qt3DRender::QEffect( this );
Qt3DRender::QTechnique *technique = new Qt3DRender::QTechnique( this );
@@ -144,6 +144,7 @@ Qt3DRender::QFrameGraphNode *QgsShadowRenderingFrameGraph::constructPostprocessi
}

QgsShadowRenderingFrameGraph::QgsShadowRenderingFrameGraph( QWindow *window, Qt3DRender::QCamera *mainCamera, Qt3DCore::QEntity *root )
: Qt3DCore::QEntity( root )
{
mRootEntity = root;
mMainCamera = mainCamera;
@@ -53,7 +53,7 @@ class QgsPreviewQuad;
*
* \since QGIS 3.16
*/
class QgsShadowRenderingFrameGraph
class QgsShadowRenderingFrameGraph : public Qt3DCore::QEntity
{
public:
//! Constructor

0 comments on commit 465f2d9

Please sign in to comment.
You can’t perform that action at this time.