Skip to content

Commit

Permalink
Merge pull request #167 from j8xixo12/fix_render
Browse files Browse the repository at this point in the history
Fix qt geometry render issue by modified vertex size
  • Loading branch information
yungyuc committed Dec 9, 2022
2 parents 315f69c + fa21d6e commit 7cad02e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/modmesh/view/RAxisMark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ RLine::RLine(QVector3D const & v0, QVector3D const & v1, QColor const & color, Q
vertices->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
vertices->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
vertices->setVertexBaseType(Qt3DCore::QAttribute::Float);
vertices->setVertexSize(3);
vertices->setVertexSize(5);
vertices->setBuffer(buf);
vertices->setByteStride(3 * sizeof(float));
vertices->setCount(2);
Expand Down
2 changes: 1 addition & 1 deletion cpp/modmesh/view/RStaticMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void RStaticMesh::update_geometry_impl(StaticMesh const & mh, Qt3DCore::QGeometr
vertices->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
vertices->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
vertices->setVertexBaseType(Qt3DCore::QAttribute::Float);
vertices->setVertexSize(3);
vertices->setVertexSize(5);
auto * buf = new Qt3DCore::QBuffer(geom);
{
// Copy mesh node coordinates into the Qt buffer.
Expand Down

0 comments on commit 7cad02e

Please sign in to comment.