[Interest] [Qt3D] QLayerFilters

Andy asmaloney at gmail.com
Sat Jan 30 23:28:50 CET 2016


I'm trying to add layer filters to a Qt3DRender::QForwardRenderer (C++).

I'm constructing a Qt3DRender::QLayerFilter as a child of the forward
renderer.  I would expect (based on looking at the code) that doing only
that should result in no geometry being rendered at all.  Even if I set the
layers to something reasonable, all the geometry is still being rendered.

(Aside - there's a comment in the code isEntityInLayers() in
renderview.cpp: "Should we treat lack of layer data as implicitly meaning
that an entity is in all layers?".  IMHO - yes.)

I see two examples which seem to add the QLayerFilter in different places -
the wave example adds it to Viewport -> CameraSelector and the deferred
renderer adds it directly to the DeferredRenderer (a QViewport).

The deferred render example just displays a black screen for me, so maybe
that's not in the right place?  If it is supposed to be on the
QCameraSelector is there a way to get that from the QForwardRenderer (C++)?

Where/how do I add the QLayerFilter to a forward renderer to actually
filter the geometry?

Thanks for any insight!

(I'm building on the Qt 5.6 branch, so qt3d SHA 44c743c90c.)

P.S. Any chance we'll see more Qt3D docs soon?  Spelunking the code is
good, but would be nice to have some high-level info about these classes.

- Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160130/efe19489/attachment.html>


More information about the Interest mailing list