[Interest] Qt3D face culling

Юрий Дынников morodeer at gmail.com
Thu Mar 10 16:13:07 CET 2016


Hello, I'm trying to use Qt3D (C++) module, and there is one huge problem:
How can I enable displaying any surface (or triangle, to be simple) from
both sides?

I've read that that's all about face-culling, but I can't find where it is
applied during preparation of scene.
I've found QCullFace class and managed to find the place where it should
belong by finding QML examples with culling settings:
QMaterial->QTechnique->QRenderPass->QCullFace(or any other QRenderState).
But if I replace QCuboidMesh with QPlaneMesh in "Basic shapes" examples,
and try to debug all those levels of structure, I find that neither for
QPhongMaterial (tested it on Qt5.5.1) nor for QGoochMaterial (It works on
Qt5.6.0rc1) there are no QCullFace objects in their compositions.

I've also tried to make a class for mesh of two triangles based on three
vertices, but rearranging indexes to make it "flip" didn't work. Neither
did modifying normals or tangents.

Thanks in advance,
morodeer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160310/3ace15eb/attachment.html>


More information about the Interest mailing list