Skip to content
Permalink
Browse files

Correct fix for leaked light parameters

  • Loading branch information
nyalldawson committed Nov 6, 2020
1 parent d601b69 commit f6e61499420b92c7ddacc787708fc19ac5f3cabe
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/3d/qgspostprocessingentity.cpp
@@ -124,8 +124,10 @@ QgsPostprocessingEntity::QgsPostprocessingEntity( QgsShadowRenderingFrameGraph *
mShadowBiasParameter = new Qt3DRender::QParameter( "shadowBias", QVariant::fromValue( 0.00001f ) );
mMaterial->addParameter( mShadowBiasParameter );

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

mEffect = new Qt3DRender::QEffect( this );
Qt3DRender::QTechnique *technique = new Qt3DRender::QTechnique( this );

0 comments on commit f6e6149

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