Permalink
Browse files

qmlui: more cleanup

  • Loading branch information...
mcallegari committed Nov 28, 2018
1 parent 089ed86 commit 4730b33ee49dedaafca1018f45b5ee746df598de
@@ -147,7 +147,7 @@ void MainView3D::resetItems()
{
qDebug() << "Resetting 3D items...";
QMetaObject::invokeMethod(m_scene3D, "updateSceneGraph", Q_ARG(QVariant, false));
QMetaObject::invokeMethod(m_scene3D, "updateFrameGraph", Q_ARG(QVariant, false));
QMapIterator<quint32, SceneItem*> it(m_entitiesMap);
while(it.hasNext())
@@ -364,7 +364,7 @@ void MainView3D::initialize3DProperties()
if (m_stageEntity == nullptr)
createStage();
QMetaObject::invokeMethod(m_scene3D, "updateSceneGraph", Q_ARG(QVariant, true));
QMetaObject::invokeMethod(m_scene3D, "updateFrameGraph", Q_ARG(QVariant, true));
}
QString MainView3D::makeShader(QString str) {
@@ -1017,7 +1017,7 @@ void MainView3D::initializeFixture(quint32 itemID, QEntity *fxEntity, QSceneLoad
// Update the Scene Graph only when the last fixture has been added to the Scene
if (m_createItemCount == 0)
{
QMetaObject::invokeMethod(m_scene3D, "updateSceneGraph", Q_ARG(QVariant, true));
QMetaObject::invokeMethod(m_scene3D, "updateFrameGraph", Q_ARG(QVariant, true));
#ifdef SHOW_FRAMEGRAPH
if (m_scene3DEntity)
walkNode(m_scene3DEntity, 0);
@@ -60,13 +60,12 @@ Rectangle
anchors.fill: parent
aspects: ["input", "logic"]
function updateSceneGraph(create)
function updateFrameGraph(create)
{
var ic
var iHead
var headEntity
var component, component2
var sgNode
var fixtures = []
var fixtureItem
@@ -113,7 +112,7 @@ Rectangle
{
headEntity = fixtureItem.getHead(iHead)
sgNode = component.createObject(frameGraph.myShadowFrameGraphNode,
component.createObject(frameGraph.myShadowFrameGraphNode,
{
"fixtureItem": headEntity,
"layers": sceneEntity.deferredLayer
@@ -126,7 +125,7 @@ Rectangle
if (component.status === Component.Error)
console.log("Error loading component:", component.errorString())
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"gBuffer": gBufferTarget,
"layers": sceneEntity.deferredLayer,
@@ -136,7 +135,7 @@ Rectangle
if (component.status === Component.Error)
console.log("Error loading component:", component.errorString())
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"gBuffer": gBufferTarget,
"layers": sceneEntity.selectionLayer,
@@ -161,7 +160,7 @@ Rectangle
if (component.status === Component.Error)
console.log("Error loading component:", component.errorString());
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"gBuffer": gBufferTarget,
"screenQuadLayer": screenQuadGrabBrightEntity.quadLayer,
@@ -180,7 +179,7 @@ Rectangle
{
dim = (1 << (ic + 1))
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"inTex": texChainTextures[ic],
"screenQuadLayer": texChainDownsampleEntities[ic].quadLayer,
@@ -196,7 +195,7 @@ Rectangle
for (ic = 0; ic < (TEX_CHAIN_LEN - 1); ++ic)
{
dim = (1 << (TEX_CHAIN_LEN - 2 - ic))
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"inTex": texChainTextures[TEX_CHAIN_LEN - 1 - ic],
"screenQuadLayer": texChainUpsampleEntities[ic].quadLayer,
@@ -209,7 +208,7 @@ Rectangle
component = Qt.createComponent("DirectionalLightFilter.qml");
if (component.status === Component.Error)
console.log("Error loading component:", component.errorString())
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"gBuffer": gBufferTarget,
"screenQuadLayer": screenQuadEntity.layer,
@@ -234,7 +233,7 @@ Rectangle
{
headEntity = fixtureItem.getHead(iHead)
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"gBuffer": gBufferTarget,
"shadowTex": headEntity.depthTex,
@@ -267,13 +266,13 @@ Rectangle
{
headEntity = fixtureItem.getHead(iHead)
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"frontDepth": depthTarget,
"outputDepthLayer": headEntity.outputDepthLayer
});
sgNode = component2.createObject(frameGraph.myCameraSelector,
component2.createObject(frameGraph.myCameraSelector,
{
"fixtureItem": headEntity,
"frontDepth": depthTarget,
@@ -290,7 +289,7 @@ Rectangle
if (component.status === Component.Error)
console.log("Error loading component:", component.errorString());
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"hdrTexture": frameTarget.color,
"bloomTexture": texChainTextures[0],
@@ -302,7 +301,7 @@ Rectangle
if (component.status === Component.Error)
console.log("Error loading component:", component.errorString())
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"inTexture": hdr0ColorTexture,
"outRenderTarget": hdr1RenderTarget,
@@ -313,7 +312,7 @@ Rectangle
if (component.status === Component.Error)
console.log("Error loading component:", component.errorString())
sgNode = component.createObject(frameGraph.myCameraSelector,
component.createObject(frameGraph.myCameraSelector,
{
"inTexture": hdr1ColorTexture,
"screenQuadBlitLayer": screenQuadBlitEntity.quadLayer
@@ -43,11 +43,7 @@ RenderSettings
RenderSurfaceSelector
{
FrameGraphNode { id: shadowFrameGraphNode }
FrameGraphNode
{
CameraSelector { id: sceneCameraSelector }
}
CameraSelector { id: sceneCameraSelector }
} // RenderSurfaceSelector
} // Viewport
}

0 comments on commit 4730b33

Please sign in to comment.