[Interest] How to combine glLineWidth call with Qt3D in QML?

Sean Harmer sean.harmer at kdab.com
Wed Sep 9 09:44:49 CEST 2015

On Wednesday 09 Sep 2015 03:39:10 Bin Chen wrote:
> Hi, Guys,
> I am evaluating Qt3D with a new project. I wrote a customised Qt3D object
> for loading and displaying triangle mesh lines in 3d scene and wondering
> where I can put in glLineWidth to change the line width.
> What I am doing is inheriting from Qt3D::QAbstractMesh, and providing a
> Qt3D::QAbstractMeshFunctorPtr to return Qt3D::QMeshData constructed with
> Qt3D::QMeshData::Lines. 
> I can’t find anywhere I can specify the line width in any Qt3D QML objects.
> I know I can achieve that by shaders but I think using glLineWidth is a
> simpler way to do it.
> Does Qt3D allow me to specify any OpenGL function calls during rendering for
> a particular object?

No, we don't allow arbitrary OpenGL calls to be injected so that we can track 
the state.

We will need to add API for this somewhere to handle this use case. Could you 
file a JIRA for this please?


Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts

More information about the Interest mailing list