Skip to content

Commit

Permalink
fix the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik authored and wonder-sk committed Sep 15, 2017
1 parent f7c942c commit d7b821d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/3d/pointentity.cpp
Expand Up @@ -86,6 +86,8 @@ PointEntity::PointEntity( const Map3D &map, QgsVectorLayer *layer, const Point3D
instanceDataAttribute->setVertexSize( 3 );
instanceDataAttribute->setDivisor( 1 );
instanceDataAttribute->setBuffer( instanceBuffer );
instanceDataAttribute->setCount(count);
instanceDataAttribute->setByteStride(3 * sizeof(float));

Qt3DRender::QGeometry *geometry = nullptr;
QString shape = symbol.shapeProperties["shape"].toString();
Expand Down Expand Up @@ -159,6 +161,7 @@ PointEntity::PointEntity( const Map3D &map, QgsVectorLayer *layer, const Point3D
}

geometry->addAttribute( instanceDataAttribute );
geometry->setBoundingVolumePositionAttribute(instanceDataAttribute);

Qt3DRender::QGeometryRenderer *renderer = new Qt3DRender::QGeometryRenderer;
renderer->setGeometry( geometry );
Expand Down

0 comments on commit d7b821d

Please sign in to comment.