FrameGraphItems C++ Qml API
authorPaul Lemire <paul.lemire@kdab.com>
Tue, 6 May 2014 06:35:24 +0000 (08:35 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 24 May 2014 18:44:41 +0000 (20:44 +0200)
commit92398ff86ba86813d2bd71469f05f660a9066fc3
tree47cdbf7b83f8ef582d2b2d5fd792d58755455ee9
parent7e9b29fabd36ee7cc9cc4087df907d60fdb452f8
FrameGraphItems C++ Qml API

FrameGraphItems are different from usual Qt3D elements as they inherit from
FrameGraphItem which is a sublcass of Node. As Qml items should now inherit
Quick3DNode instead of Node, this makes using old FrameGraphItems as they were
impossible because children cannot be added to a Node in Qml if the Node is
not a Quick3DNode.

One method that reduces code duplication to the minimum is creating abstract
classes for Viewport, RenderTargetSelector, CameraSelector, RenderPassFilter
and TechniqueFilter. Then the C++ FrameGraphItem Nodes can inherit from node
and one of those abstracts. On the QML side, Quick3D FrameGraphItems inherit
from Quick3DNode and one of the base class.

Because multiple inheritance of QObject is not possible, abstract
FrameGraphItems are not subclasses of QObject and are therefore declared as
Q_INTERFACES so as to be able to perform qobject_cast.

Change-Id: Ibf1350a53ce409ff03aad8d0fd8f5b7d6cc26fc0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
42 files changed:
src/core/nodes/quick3dnode.h
src/render/backend/rendereraspect.cpp
src/render/backend/renderscenebuilder.cpp
src/render/backend/renderscenebuilder.h
src/render/frontend/cameraselector.cpp [deleted file]
src/render/frontend/cameraselector.h
src/render/frontend/cameraselectoritem.cpp [new file with mode: 0644]
src/render/frontend/cameraselectoritem.h [new file with mode: 0644]
src/render/frontend/framegraph.cpp
src/render/frontend/framegraph.h
src/render/frontend/framegraphitem.cpp
src/render/frontend/framegraphitem.h
src/render/frontend/framegraphitem_p.h [new file with mode: 0644]
src/render/frontend/quick3dcameraselector.cpp [new file with mode: 0644]
src/render/frontend/quick3dcameraselector.h [new file with mode: 0644]
src/render/frontend/quick3dframegraphitem.cpp [new file with mode: 0644]
src/render/frontend/quick3dframegraphitem.h [new file with mode: 0644]
src/render/frontend/quick3drenderpassfilter.cpp [new file with mode: 0644]
src/render/frontend/quick3drenderpassfilter.h [new file with mode: 0644]
src/render/frontend/quick3drendertargetselector.cpp [new file with mode: 0644]
src/render/frontend/quick3drendertargetselector.h [new file with mode: 0644]
src/render/frontend/quick3dtechniquefilter.cpp [new file with mode: 0644]
src/render/frontend/quick3dtechniquefilter.h [new file with mode: 0644]
src/render/frontend/quick3dviewport.cpp [new file with mode: 0644]
src/render/frontend/quick3dviewport.h [new file with mode: 0644]
src/render/frontend/render-frontend.pri
src/render/frontend/renderpassfilter.cpp [deleted file]
src/render/frontend/renderpassfilter.h
src/render/frontend/renderpassfilteritem.cpp [new file with mode: 0644]
src/render/frontend/renderpassfilteritem.h [new file with mode: 0644]
src/render/frontend/rendertargetselector.cpp [deleted file]
src/render/frontend/rendertargetselector.h
src/render/frontend/rendertargetselectoritem.cpp [new file with mode: 0644]
src/render/frontend/rendertargetselectoritem.h [new file with mode: 0644]
src/render/frontend/techniquefilter.cpp [deleted file]
src/render/frontend/techniquefilter.h
src/render/frontend/techniquefilteritem.cpp [new file with mode: 0644]
src/render/frontend/techniquefilteritem.h [new file with mode: 0644]
src/render/frontend/viewport.cpp [deleted file]
src/render/frontend/viewport.h
src/render/frontend/viewportitem.cpp [new file with mode: 0644]
src/render/frontend/viewportitem.h [new file with mode: 0644]