Skip to content

Commit

Permalink
remove switching for pointSize usage
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Dec 3, 2020
1 parent 6476273 commit baef557
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/3d/qgspointcloudlayerchunkloader_p.cpp
Expand Up @@ -291,21 +291,7 @@ void QgsPointCloud3DSymbolHandler::makeEntity( Qt3DCore::QEntity *parent, const

Qt3DRender::QPointSize *pointSize = new Qt3DRender::QPointSize( renderPass );
pointSize->setSizeMode( Qt3DRender::QPointSize::Programmable ); // supported since OpenGL 3.2
switch ( mSymbol->renderingStyle() )
{
case QgsPointCloud3DSymbol::RenderingStyle::NoRendering:
// Do Nothing since there is no rendering
break;
case QgsPointCloud3DSymbol::RenderingStyle::SingleColor:
pointSize->setValue( dynamic_cast<QgsSingleColorPointCloud3DSymbol *>( mSymbol.get() )->pointSize() );
break;
case QgsPointCloud3DSymbol::RenderingStyle::ColorRamp:
pointSize->setValue( dynamic_cast<QgsColorRampPointCloud3DSymbol *>( mSymbol.get() )->pointSize() );
break;
case QgsPointCloud3DSymbol::RenderingStyle::RGBRendering:
pointSize->setValue( dynamic_cast<QgsRGBPointCloud3DSymbol *>( mSymbol.get() )->pointSize() );
break;
}
pointSize->setValue( mSymbol ? mSymbol->pointSize() : 1.0f );
renderPass->addRenderState( pointSize );

// without this filter the default forward renderer would not render this
Expand Down

0 comments on commit baef557

Please sign in to comment.