summaryrefslogtreecommitdiffstats
path: root/src/quick3d
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick3d')
-rw-r--r--src/quick3d/imports/animation/plugins.qmltypes55
-rw-r--r--src/quick3d/imports/core/plugins.qmltypes73
-rw-r--r--src/quick3d/imports/extras/plugins.qmltypes55
-rw-r--r--src/quick3d/imports/input/plugins.qmltypes2
-rw-r--r--src/quick3d/imports/logic/plugins.qmltypes2
-rw-r--r--src/quick3d/imports/render/plugins.qmltypes255
-rw-r--r--src/quick3d/imports/scene2d/plugins.qmltypes2
-rw-r--r--src/quick3d/imports/scene3d/plugins.qmltypes38
-rw-r--r--src/quick3d/imports/scene3d/scene3ditem.cpp81
-rw-r--r--src/quick3d/imports/scene3d/scene3drenderer.cpp23
-rw-r--r--src/quick3d/imports/scene3d/scene3drenderer_p.h3
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp1
-rw-r--r--src/quick3d/imports/scene3d/scene3dview.cpp2
-rw-r--r--src/quick3d/quick3d/qquaternionanimation.cpp2
-rw-r--r--src/quick3d/quick3dextras/qt3dquickwindow.cpp2
-rw-r--r--src/quick3d/quick3dscene2d/items/qscene2d.cpp6
-rw-r--r--src/quick3d/quick3dscene2d/items/qscene2d.h5
-rw-r--r--src/quick3d/quick3dscene2d/items/scene2d.cpp16
-rw-r--r--src/quick3d/quick3dscene2d/items/scene2dsharedobject.cpp1
19 files changed, 574 insertions, 50 deletions
diff --git a/src/quick3d/imports/animation/plugins.qmltypes b/src/quick3d/imports/animation/plugins.qmltypes
index a8f207245..aff5ccb9c 100644
--- a/src/quick3d/imports/animation/plugins.qmltypes
+++ b/src/quick3d/imports/animation/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Animation 2.13'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Animation 2.14'
Module {
dependencies: ["Qt3D.Core 2.0"]
@@ -699,4 +699,57 @@ Module {
isReadonly: true
}
}
+ Component {
+ name: "Qt3DCore::QNode"
+ defaultProperty: "data"
+ prototype: "QObject"
+ exports: ["Qt3D.Animation/Node 2.9"]
+ isCreatable: false
+ exportMetaObjectRevisions: [209]
+ Enum {
+ name: "PropertyTrackingMode"
+ values: {
+ "TrackFinalValues": 0,
+ "DontTrackValues": 1,
+ "TrackAllValues": 2
+ }
+ }
+ Property { name: "parent"; type: "Qt3DCore::QNode"; isPointer: true }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "defaultPropertyTrackingMode"; revision: 9; type: "PropertyTrackingMode" }
+ Signal {
+ name: "parentChanged"
+ Parameter { name: "parent"; type: "QObject"; isPointer: true }
+ }
+ Signal {
+ name: "enabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "defaultPropertyTrackingModeChanged"
+ Parameter { name: "mode"; type: "PropertyTrackingMode" }
+ }
+ Signal { name: "nodeDestroyed" }
+ Method {
+ name: "setParent"
+ Parameter { name: "parent"; type: "QNode"; isPointer: true }
+ }
+ Method {
+ name: "setEnabled"
+ Parameter { name: "isEnabled"; type: "bool" }
+ }
+ Method {
+ name: "setDefaultPropertyTrackingMode"
+ Parameter { name: "mode"; type: "PropertyTrackingMode" }
+ }
+ Property { name: "propertyTrackingOverrides"; revision: 209; type: "QJSValue" }
+ Property { name: "data"; revision: 209; type: "QObject"; isList: true; isReadonly: true }
+ Property {
+ name: "childNodes"
+ revision: 209
+ type: "Qt3DCore::QNode"
+ isList: true
+ isReadonly: true
+ }
+ }
}
diff --git a/src/quick3d/imports/core/plugins.qmltypes b/src/quick3d/imports/core/plugins.qmltypes
index 390fd78fb..476bb99a7 100644
--- a/src/quick3d/imports/core/plugins.qmltypes
+++ b/src/quick3d/imports/core/plugins.qmltypes
@@ -4,11 +4,73 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable Qt3D.Core 2.13'
+// 'qmlplugindump -nonrelocatable Qt3D.Core 2.14'
Module {
dependencies: ["QtQuick 2.0"]
Component {
+ name: "QQmlEasingValueType"
+ exports: ["Qt3D.Core/Easing 2.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Type"
+ values: {
+ "Linear": 0,
+ "InQuad": 1,
+ "OutQuad": 2,
+ "InOutQuad": 3,
+ "OutInQuad": 4,
+ "InCubic": 5,
+ "OutCubic": 6,
+ "InOutCubic": 7,
+ "OutInCubic": 8,
+ "InQuart": 9,
+ "OutQuart": 10,
+ "InOutQuart": 11,
+ "OutInQuart": 12,
+ "InQuint": 13,
+ "OutQuint": 14,
+ "InOutQuint": 15,
+ "OutInQuint": 16,
+ "InSine": 17,
+ "OutSine": 18,
+ "InOutSine": 19,
+ "OutInSine": 20,
+ "InExpo": 21,
+ "OutExpo": 22,
+ "InOutExpo": 23,
+ "OutInExpo": 24,
+ "InCirc": 25,
+ "OutCirc": 26,
+ "InOutCirc": 27,
+ "OutInCirc": 28,
+ "InElastic": 29,
+ "OutElastic": 30,
+ "InOutElastic": 31,
+ "OutInElastic": 32,
+ "InBack": 33,
+ "OutBack": 34,
+ "InOutBack": 35,
+ "OutInBack": 36,
+ "InBounce": 37,
+ "OutBounce": 38,
+ "InOutBounce": 39,
+ "OutInBounce": 40,
+ "InCurve": 41,
+ "OutCurve": 42,
+ "SineCurve": 43,
+ "CosineCurve": 44,
+ "Bezier": 45
+ }
+ }
+ Property { name: "type"; type: "Type" }
+ Property { name: "amplitude"; type: "double" }
+ Property { name: "overshoot"; type: "double" }
+ Property { name: "period"; type: "double" }
+ Property { name: "bezierCurve"; type: "QVariantList" }
+ }
+ Component {
name: "Qt3DCore::QAbstractSkeleton"
prototype: "Qt3DCore::QNode"
exports: ["Qt3D.Core/AbstractSkeleton 2.10"]
@@ -266,8 +328,8 @@ Module {
Component {
name: "Qt3DCore::QTransform"
prototype: "Qt3DCore::QComponent"
- exports: ["Qt3D.Core/Transform 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["Qt3D.Core/Transform 2.0", "Qt3D.Core/Transform 2.14"]
+ exportMetaObjectRevisions: [0, 14]
Property { name: "matrix"; type: "QMatrix4x4" }
Property { name: "scale"; type: "float" }
Property { name: "scale3D"; type: "QVector3D" }
@@ -276,6 +338,7 @@ Module {
Property { name: "rotationX"; type: "float" }
Property { name: "rotationY"; type: "float" }
Property { name: "rotationZ"; type: "float" }
+ Property { name: "worldMatrix"; revision: 14; type: "QMatrix4x4"; isReadonly: true }
Signal {
name: "scaleChanged"
Parameter { name: "scale"; type: "float" }
@@ -304,6 +367,10 @@ Module {
name: "rotationZChanged"
Parameter { name: "rotationZ"; type: "float" }
}
+ Signal {
+ name: "worldMatrixChanged"
+ Parameter { name: "worldMatrix"; type: "QMatrix4x4" }
+ }
Method {
name: "setScale"
Parameter { name: "scale"; type: "float" }
diff --git a/src/quick3d/imports/extras/plugins.qmltypes b/src/quick3d/imports/extras/plugins.qmltypes
index 72857d402..fcc15e022 100644
--- a/src/quick3d/imports/extras/plugins.qmltypes
+++ b/src/quick3d/imports/extras/plugins.qmltypes
@@ -4,10 +4,51 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Extras 2.13'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Extras 2.14'
Module {
dependencies: ["Qt3D.Logic 2.0", "Qt3D.Render 2.0"]
+ Component { name: "Qt3DCore::QEntity"; prototype: "Qt3DCore::QNode" }
+ Component {
+ name: "Qt3DCore::QNode"
+ prototype: "QObject"
+ Enum {
+ name: "PropertyTrackingMode"
+ values: {
+ "TrackFinalValues": 0,
+ "DontTrackValues": 1,
+ "TrackAllValues": 2
+ }
+ }
+ Property { name: "parent"; type: "Qt3DCore::QNode"; isPointer: true }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "defaultPropertyTrackingMode"; revision: 9; type: "PropertyTrackingMode" }
+ Signal {
+ name: "parentChanged"
+ Parameter { name: "parent"; type: "QObject"; isPointer: true }
+ }
+ Signal {
+ name: "enabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "defaultPropertyTrackingModeChanged"
+ Parameter { name: "mode"; type: "PropertyTrackingMode" }
+ }
+ Signal { name: "nodeDestroyed" }
+ Method {
+ name: "setParent"
+ Parameter { name: "parent"; type: "QNode"; isPointer: true }
+ }
+ Method {
+ name: "setEnabled"
+ Parameter { name: "isEnabled"; type: "bool" }
+ }
+ Method {
+ name: "setDefaultPropertyTrackingMode"
+ Parameter { name: "mode"; type: "PropertyTrackingMode" }
+ }
+ }
Component {
name: "Qt3DExtras::Extras::Quick::Quick3DLevelOfDetailLoader"
prototype: "Qt3DCore::QEntity"
@@ -758,13 +799,15 @@ Module {
prototype: "Qt3DRender::QTechniqueFilter"
exports: [
"Qt3D.Extras/ForwardRenderer 2.0",
+ "Qt3D.Extras/ForwardRenderer 2.14",
"Qt3D.Extras/ForwardRenderer 2.9"
]
- exportMetaObjectRevisions: [0, 9]
+ exportMetaObjectRevisions: [0, 14, 9]
Property { name: "surface"; type: "QObject"; isPointer: true }
Property { name: "window"; type: "QObject"; isPointer: true }
Property { name: "viewportRect"; type: "QRectF" }
Property { name: "clearColor"; type: "QColor" }
+ Property { name: "buffersToClear"; revision: 14; type: "Qt3DRender::QClearBuffers::BufferType" }
Property { name: "camera"; type: "Qt3DCore::QEntity"; isPointer: true }
Property { name: "externalRenderTargetSize"; type: "QSize" }
Property { name: "frustumCulling"; type: "bool" }
@@ -778,6 +821,10 @@ Module {
Parameter { name: "clearColor"; type: "QColor" }
}
Signal {
+ name: "buffersToClearChanged"
+ Parameter { type: "Qt3DRender::QClearBuffers::BufferType" }
+ }
+ Signal {
name: "cameraChanged"
Parameter { name: "camera"; type: "Qt3DCore::QEntity"; isPointer: true }
}
@@ -806,6 +853,10 @@ Module {
Parameter { name: "clearColor"; type: "QColor" }
}
Method {
+ name: "setBuffersToClear"
+ Parameter { type: "Qt3DRender::QClearBuffers::BufferType" }
+ }
+ Method {
name: "setCamera"
Parameter { name: "camera"; type: "Qt3DCore::QEntity"; isPointer: true }
}
diff --git a/src/quick3d/imports/input/plugins.qmltypes b/src/quick3d/imports/input/plugins.qmltypes
index 8e9cac4d1..0a70b97c3 100644
--- a/src/quick3d/imports/input/plugins.qmltypes
+++ b/src/quick3d/imports/input/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Input 2.13'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Input 2.14'
Module {
dependencies: ["Qt3D.Core 2.0"]
diff --git a/src/quick3d/imports/logic/plugins.qmltypes b/src/quick3d/imports/logic/plugins.qmltypes
index 294f6b068..1ad7b1f58 100644
--- a/src/quick3d/imports/logic/plugins.qmltypes
+++ b/src/quick3d/imports/logic/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Logic 2.13'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Logic 2.14'
Module {
dependencies: ["Qt3D.Core 2.0"]
diff --git a/src/quick3d/imports/render/plugins.qmltypes b/src/quick3d/imports/render/plugins.qmltypes
index f5f5b3c61..6408abb27 100644
--- a/src/quick3d/imports/render/plugins.qmltypes
+++ b/src/quick3d/imports/render/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Render 2.13'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt3D.Render 2.14'
Module {
dependencies: ["Qt3D.Core 2.0"]
@@ -362,7 +362,8 @@ Module {
"R5G6B5": 36194,
"RGB5A1": 32855,
"RGBA4": 32854,
- "RGB10A2": 36975,
+ "RGB10A2": 32857,
+ "RGB10A2U": 36975,
"D16": 33189,
"D24": 33190,
"D24S8": 35056,
@@ -588,6 +589,10 @@ Module {
name: "setSamples"
Parameter { name: "samples"; type: "int" }
}
+ Method {
+ name: "updateData"
+ Parameter { name: "update"; type: "QTextureDataUpdate" }
+ }
}
Component {
name: "Qt3DRender::QAbstractTextureImage"
@@ -1068,8 +1073,12 @@ Module {
Component {
name: "Qt3DRender::QCamera"
prototype: "Qt3DCore::QEntity"
- exports: ["Qt3D.Render/Camera 2.0", "Qt3D.Render/Camera 2.9"]
- exportMetaObjectRevisions: [0, 9]
+ exports: [
+ "Qt3D.Render/Camera 2.0",
+ "Qt3D.Render/Camera 2.14",
+ "Qt3D.Render/Camera 2.9"
+ ]
+ exportMetaObjectRevisions: [0, 14, 9]
Enum {
name: "CameraTranslationOption"
values: {
@@ -1093,6 +1102,20 @@ Module {
Property { name: "viewCenter"; type: "QVector3D" }
Property { name: "viewVector"; type: "QVector3D"; isReadonly: true }
Property { name: "viewMatrix"; type: "QMatrix4x4"; isReadonly: true }
+ Property {
+ name: "lens"
+ revision: 14
+ type: "Qt3DRender::QCameraLens"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "transform"
+ revision: 14
+ type: "Qt3DCore::QTransform"
+ isReadonly: true
+ isPointer: true
+ }
Signal {
name: "projectionTypeChanged"
Parameter { name: "projectionType"; type: "QCameraLens::ProjectionType" }
@@ -1666,6 +1689,30 @@ Module {
}
}
Component {
+ name: "Qt3DRender::QDepthRange"
+ prototype: "Qt3DRender::QRenderState"
+ exports: ["Qt3D.Render/DepthRange 2.14"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "nearValue"; type: "double" }
+ Property { name: "farValue"; type: "double" }
+ Signal {
+ name: "nearValueChanged"
+ Parameter { name: "nearValue"; type: "double" }
+ }
+ Signal {
+ name: "farValueChanged"
+ Parameter { name: "farValue"; type: "double" }
+ }
+ Method {
+ name: "setNearValue"
+ Parameter { name: "value"; type: "double" }
+ }
+ Method {
+ name: "setFarValue"
+ Parameter { name: "value"; type: "double" }
+ }
+ }
+ Component {
name: "Qt3DRender::QDepthTest"
prototype: "Qt3DRender::QRenderState"
exports: ["Qt3D.Render/DepthTest 2.0"]
@@ -2335,6 +2382,12 @@ Module {
exportMetaObjectRevisions: [0]
}
Component {
+ name: "Qt3DRender::QNoPicking"
+ prototype: "Qt3DRender::QFrameGraphNode"
+ exports: ["Qt3D.Render/NoPicking 2.14"]
+ exportMetaObjectRevisions: [0]
+ }
+ Component {
name: "Qt3DRender::QObjectPicker"
prototype: "Qt3DCore::QComponent"
exports: [
@@ -2429,9 +2482,9 @@ Module {
Component {
name: "Qt3DRender::QPickEvent"
prototype: "QObject"
- exports: ["Qt3D.Render/PickEvent 2.0"]
+ exports: ["Qt3D.Render/PickEvent 2.0", "Qt3D.Render/PickEvent 2.14"]
isCreatable: false
- exportMetaObjectRevisions: [0]
+ exportMetaObjectRevisions: [0, 14]
Enum {
name: "Buttons"
values: {
@@ -2461,6 +2514,20 @@ Module {
Property { name: "button"; type: "Qt3DRender::QPickEvent::Buttons"; isReadonly: true }
Property { name: "buttons"; type: "int"; isReadonly: true }
Property { name: "modifiers"; type: "int"; isReadonly: true }
+ Property {
+ name: "viewport"
+ revision: 14
+ type: "Qt3DRender::QViewport"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "entity"
+ revision: 14
+ type: "Qt3DCore::QEntity"
+ isReadonly: true
+ isPointer: true
+ }
Signal {
name: "acceptedChanged"
Parameter { name: "accepted"; type: "bool" }
@@ -2654,6 +2721,46 @@ Module {
}
}
Component {
+ name: "Qt3DRender::QRasterMode"
+ prototype: "Qt3DRender::QRenderState"
+ exports: ["Qt3D.Render/RasterMode 2.13"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "RasterMode"
+ values: {
+ "Points": 6912,
+ "Lines": 6913,
+ "Fill": 6914
+ }
+ }
+ Enum {
+ name: "FaceMode"
+ values: {
+ "Front": 1028,
+ "Back": 1029,
+ "FrontAndBack": 1032
+ }
+ }
+ Property { name: "rasterMode"; type: "RasterMode" }
+ Property { name: "faceMode"; type: "FaceMode" }
+ Signal {
+ name: "rasterModeChanged"
+ Parameter { name: "rasterMode"; type: "RasterMode" }
+ }
+ Signal {
+ name: "faceModeChanged"
+ Parameter { name: "faceMode"; type: "FaceMode" }
+ }
+ Method {
+ name: "setRasterMode"
+ Parameter { name: "rasterMode"; type: "RasterMode" }
+ }
+ Method {
+ name: "setFaceMode"
+ Parameter { name: "faceMode"; type: "FaceMode" }
+ }
+ }
+ Component {
name: "Qt3DRender::QRayCaster"
prototype: "Qt3DRender::QAbstractRayCaster"
Property { name: "origin"; type: "QVector3D" }
@@ -3151,6 +3258,120 @@ Module {
exportMetaObjectRevisions: [0]
}
Component {
+ name: "Qt3DRender::QShaderImage"
+ prototype: "Qt3DCore::QNode"
+ exports: ["Qt3D.Render/ShaderImage 2.14"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Access"
+ values: {
+ "ReadOnly": 0,
+ "WriteOnly": 1,
+ "ReadWrite": 2
+ }
+ }
+ Enum {
+ name: "ImageFormat"
+ values: {
+ "NoFormat": 0,
+ "Automatic": 1,
+ "R8_UNorm": 33321,
+ "RG8_UNorm": 33323,
+ "RGBA8_UNorm": 32856,
+ "R16_UNorm": 33322,
+ "RG16_UNorm": 33324,
+ "RGBA16_UNorm": 32859,
+ "R8_SNorm": 36756,
+ "RG8_SNorm": 36757,
+ "RGBA8_SNorm": 36759,
+ "R16_SNorm": 36760,
+ "RG16_SNorm": 36761,
+ "RGBA16_SNorm": 36763,
+ "R8U": 33330,
+ "RG8U": 33336,
+ "RGBA8U": 36220,
+ "R16U": 33332,
+ "RG16U": 33338,
+ "RGBA16U": 36214,
+ "R32U": 33334,
+ "RG32U": 33340,
+ "RGBA32U": 36208,
+ "R8I": 33329,
+ "RG8I": 33335,
+ "RGBA8I": 36238,
+ "R16I": 33331,
+ "RG16I": 33337,
+ "RGBA16I": 36232,
+ "R32I": 33333,
+ "RG32I": 33339,
+ "RGBA32I": 36226,
+ "R16F": 33325,
+ "RG16F": 33327,
+ "RGBA16F": 34842,
+ "R32F": 33326,
+ "RG32F": 33328,
+ "RGBA32F": 34836,
+ "RG11B10F": 35898,
+ "RGB10A2": 32857,
+ "RGB10A2U": 36975
+ }
+ }
+ Property { name: "texture"; type: "Qt3DRender::QAbstractTexture"; isPointer: true }
+ Property { name: "layered"; type: "bool" }
+ Property { name: "mipLevel"; type: "int" }
+ Property { name: "layer"; type: "int" }
+ Property { name: "access"; type: "Access" }
+ Property { name: "format"; type: "ImageFormat" }
+ Signal {
+ name: "textureChanged"
+ Parameter { name: "texture"; type: "Qt3DRender::QAbstractTexture"; isPointer: true }
+ }
+ Signal {
+ name: "layeredChanged"
+ Parameter { name: "layered"; type: "bool" }
+ }
+ Signal {
+ name: "mipLevelChanged"
+ Parameter { name: "mipLevel"; type: "int" }
+ }
+ Signal {
+ name: "layerChanged"
+ Parameter { name: "layer"; type: "int" }
+ }
+ Signal {
+ name: "accessChanged"
+ Parameter { name: "access"; type: "Access" }
+ }
+ Signal {
+ name: "formatChanged"
+ Parameter { name: "format"; type: "ImageFormat" }
+ }
+ Method {
+ name: "setTexture"
+ Parameter { name: "texture"; type: "Qt3DRender::QAbstractTexture"; isPointer: true }
+ }
+ Method {
+ name: "setLayered"
+ Parameter { name: "layered"; type: "bool" }
+ }
+ Method {
+ name: "setMipLevel"
+ Parameter { name: "mipLevel"; type: "int" }
+ }
+ Method {
+ name: "setLayer"
+ Parameter { name: "layer"; type: "int" }
+ }
+ Method {
+ name: "setAccess"
+ Parameter { name: "access"; type: "Access" }
+ }
+ Method {
+ name: "setFormat"
+ Parameter { name: "format"; type: "ImageFormat" }
+ }
+ }
+ Component {
name: "Qt3DRender::QShaderProgram"
prototype: "Qt3DCore::QNode"
exports: [
@@ -3400,7 +3621,8 @@ Module {
"StateChangeCost": 1,
"BackToFront": 2,
"Material": 4,
- "FrontToBack": 8
+ "FrontToBack": 8,
+ "Texture": 16
}
}
Property { name: "sortTypes"; type: "QVector<int>" }
@@ -3653,6 +3875,25 @@ Module {
}
}
Component {
+ name: "Qt3DRender::QSubtreeEnabler"
+ prototype: "Qt3DRender::QFrameGraphNode"
+ exports: ["Qt3D.Render/SubtreeEnabler 2.14"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Enablement"
+ values: {
+ "Persistent": 0,
+ "SingleShot": 1
+ }
+ }
+ Property { name: "enablement"; type: "Enablement" }
+ Signal {
+ name: "enablementChanged"
+ Parameter { name: "enablement"; type: "Qt3DRender::QSubtreeEnabler::Enablement" }
+ }
+ Method { name: "requestUpdate" }
+ }
+ Component {
name: "Qt3DRender::QTechnique"
defaultProperty: "data"
prototype: "Qt3DCore::QNode"
diff --git a/src/quick3d/imports/scene2d/plugins.qmltypes b/src/quick3d/imports/scene2d/plugins.qmltypes
index 9d2c855a6..32fb8122f 100644
--- a/src/quick3d/imports/scene2d/plugins.qmltypes
+++ b/src/quick3d/imports/scene2d/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Scene2D 2.13'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Scene2D 2.14'
Module {
dependencies: ["Qt3D.Core 2.0", "Qt3D.Render 2.0"]
diff --git a/src/quick3d/imports/scene3d/plugins.qmltypes b/src/quick3d/imports/scene3d/plugins.qmltypes
index da3d7ec3e..aca01ac25 100644
--- a/src/quick3d/imports/scene3d/plugins.qmltypes
+++ b/src/quick3d/imports/scene3d/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Scene3D 2.13'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Scene3D 2.14'
Module {
dependencies: ["Qt3D.Core 2.0", "QtQuick 2.0"]
@@ -12,8 +12,11 @@ Module {
name: "Qt3DRender::Scene3DItem"
defaultProperty: "entity"
prototype: "QQuickItem"
- exports: ["QtQuick.Scene3D/Scene3D 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Scene3D/Scene3D 2.0",
+ "QtQuick.Scene3D/Scene3D 2.14"
+ ]
+ exportMetaObjectRevisions: [0, 14]
Enum {
name: "CameraAspectRatioMode"
values: {
@@ -21,11 +24,19 @@ Module {
"UserAspectRatio": 1
}
}
+ Enum {
+ name: "CompositingMode"
+ values: {
+ "FBO": 0,
+ "Underlay": 1
+ }
+ }
Property { name: "entity"; type: "Qt3DCore::QEntity"; isPointer: true }
Property { name: "aspects"; type: "QStringList" }
Property { name: "multisample"; type: "bool" }
Property { name: "cameraAspectRatioMode"; type: "CameraAspectRatioMode" }
Property { name: "hoverEnabled"; type: "bool" }
+ Property { name: "compositingMode"; revision: 14; type: "CompositingMode" }
Signal {
name: "cameraAspectRatioModeChanged"
Parameter { name: "mode"; type: "CameraAspectRatioMode" }
@@ -47,9 +58,30 @@ Module {
Parameter { name: "enabled"; type: "bool" }
}
Method {
+ name: "setCompositingMode"
+ Parameter { name: "mode"; type: "CompositingMode" }
+ }
+ Method {
name: "setItemAreaAndDevicePixelRatio"
Parameter { name: "area"; type: "QSize" }
Parameter { name: "devicePixelRatio"; type: "double" }
}
}
+ Component {
+ name: "Qt3DRender::Scene3DView"
+ defaultProperty: "entity"
+ prototype: "QQuickItem"
+ exports: ["QtQuick.Scene3D/Scene3DView 2.14"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "entity"; type: "Qt3DCore::QEntity"; isPointer: true }
+ Property { name: "scene3D"; type: "Qt3DRender::Scene3DItem"; isPointer: true }
+ Method {
+ name: "setEntity"
+ Parameter { name: "entity"; type: "Qt3DCore::QEntity"; isPointer: true }
+ }
+ Method {
+ name: "setScene3D"
+ Parameter { name: "scene3D"; type: "Scene3DItem"; isPointer: true }
+ }
+ }
}
diff --git a/src/quick3d/imports/scene3d/scene3ditem.cpp b/src/quick3d/imports/scene3d/scene3ditem.cpp
index f3f7acd71..f824d2c4e 100644
--- a/src/quick3d/imports/scene3d/scene3ditem.cpp
+++ b/src/quick3d/imports/scene3d/scene3ditem.cpp
@@ -137,6 +137,11 @@ namespace Qt3DRender {
\li The Scene3D instance is instantiated prior to any Scene3DView
\li The Scene3D entity property is left unset
\endlist
+
+ \note Åšetting the visibility of the Scene3D element to false will halt the
+ Qt 3D simulation loop. This means that binding the visible property to an
+ expression that depends on property updates driven by the Qt 3D simulation
+ loop (FrameAction) will never reavaluates.
*/
Scene3DItem::Scene3DItem(QQuickItem *parent)
: QQuickItem(parent)
@@ -154,6 +159,7 @@ Scene3DItem::Scene3DItem(QQuickItem *parent)
, m_disableClearWindow(false)
, m_cameraAspectRatioMode(AutomaticAspectRatio)
, m_compositingMode(FBO)
+ , m_dummySurface(nullptr)
{
setFlag(QQuickItem::ItemHasContents, true);
setAcceptedMouseButtons(Qt::MouseButtonMask);
@@ -427,12 +433,26 @@ void Scene3DItem::applyRootEntityChange()
bool Scene3DItem::needsRender()
{
+ // We need the dirty flag which is connected to the change arbiter
+ // receiving updates to know whether something in the scene has changed
+
+ // Ideally we would use shouldRender() alone but given that it becomes true
+ // only after the arbiter has sync the changes and might be reset before
+ // process jobs is completed, we cannot fully rely on it. It would require
+ // splitting processFrame in 2 parts.
+
+ // We only use it for cases where Qt3D render may require several loops of
+ // the simulation to fully process a frame (e.g shaders are loaded in frame
+ // n and we can only build render commands for the new shader at frame n +
+ // This is where renderer->shouldRender() comes into play as it knows
+ // whether some states remain dirty or not (even after processFrame is
+ // called)
+
auto renderAspectPriv = static_cast<QRenderAspectPrivate*>(QRenderAspectPrivate::get(m_renderAspect));
const bool dirty = m_dirty
|| (renderAspectPriv
&& renderAspectPriv->m_renderer
- && renderAspectPriv->m_renderer->settings()
- && renderAspectPriv->m_renderer->settings()->renderPolicy() == QRenderSettings::Always);
+ && renderAspectPriv->m_renderer->shouldRender());
m_dirty = false;
return dirty;
}
@@ -454,8 +474,12 @@ bool Scene3DItem::needsRender()
// processFrame will block and wait for renderer to have been finished
void Scene3DItem::onBeforeSync()
{
- // Has anything in the 3D scene actually changed that requires us to render?
- if (!needsRender())
+ static bool dontRenderWhenHidden = !qgetenv("QT3D_SCENE3D_STOP_RENDER_HIDDEN").isEmpty();
+
+ // If we are not visible, don't processFrame changes as we would end up
+ // waiting forever for the scene to be rendered which won't happen
+ // if the Scene3D item is not visible
+ if (!isVisible() && dontRenderWhenHidden)
return;
Q_ASSERT(QThread::currentThread() == thread());
@@ -498,6 +522,7 @@ void Scene3DItem::onBeforeSync()
// start rendering before this function has been called
// We add in a safety to skip such frames as this could otherwise
// make Qt3D enter a locked state
+ m_renderer->setSkipFrame(!needsRender());
m_renderer->allowRender();
// Note: it's too early to request an update at this point as
@@ -546,7 +571,7 @@ void Scene3DItem::setWindowSurface(QObject *rootObject)
/*!
\qmlmethod void Scene3D::setItemAreaAndDevicePixelRatio(size area, real devicePixelRatio)
- \brief \TODO
+ Sets the item area to \a area and the pixel ratio to \a devicePixelRatio.
*/
void Scene3DItem::setItemAreaAndDevicePixelRatio(QSize area, qreal devicePixelRatio)
{
@@ -569,25 +594,45 @@ bool Scene3DItem::isHoverEnabled() const
void Scene3DItem::setCameraAspectModeHelper()
{
- switch (m_cameraAspectRatioMode) {
- case AutomaticAspectRatio:
- connect(this, &Scene3DItem::widthChanged, this, &Scene3DItem::updateCameraAspectRatio);
- connect(this, &Scene3DItem::heightChanged, this, &Scene3DItem::updateCameraAspectRatio);
- // Update the aspect ratio the first time the surface is set
- updateCameraAspectRatio();
- break;
- case UserAspectRatio:
- disconnect(this, &Scene3DItem::widthChanged, this, &Scene3DItem::updateCameraAspectRatio);
- disconnect(this, &Scene3DItem::heightChanged, this, &Scene3DItem::updateCameraAspectRatio);
- break;
+ if (m_compositingMode == FBO) {
+ switch (m_cameraAspectRatioMode) {
+ case AutomaticAspectRatio:
+ connect(this, &Scene3DItem::widthChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ connect(this, &Scene3DItem::heightChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ // Update the aspect ratio the first time the surface is set
+ updateCameraAspectRatio();
+ break;
+ case UserAspectRatio:
+ disconnect(this, &Scene3DItem::widthChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ disconnect(this, &Scene3DItem::heightChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ break;
+ }
+ } else {
+ // In Underlay mode, we rely on the window for aspect ratio and not the size of the Scene3DItem
+ switch (m_cameraAspectRatioMode) {
+ case AutomaticAspectRatio:
+ connect(window(), &QWindow::widthChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ connect(window(), &QWindow::heightChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ // Update the aspect ratio the first time the surface is set
+ updateCameraAspectRatio();
+ break;
+ case UserAspectRatio:
+ disconnect(window(), &QWindow::widthChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ disconnect(window(), &QWindow::heightChanged, this, &Scene3DItem::updateCameraAspectRatio);
+ break;
+ }
}
}
void Scene3DItem::updateCameraAspectRatio()
{
if (m_camera) {
- m_camera->setAspectRatio(static_cast<float>(width()) /
- static_cast<float>(height()));
+ if (m_compositingMode == FBO)
+ m_camera->setAspectRatio(static_cast<float>(width()) /
+ static_cast<float>(height()));
+ else
+ m_camera->setAspectRatio(static_cast<float>(window()->width()) /
+ static_cast<float>(window()->height()));
}
}
diff --git a/src/quick3d/imports/scene3d/scene3drenderer.cpp b/src/quick3d/imports/scene3d/scene3drenderer.cpp
index 1e375ccbb..fafeeedf4 100644
--- a/src/quick3d/imports/scene3d/scene3drenderer.cpp
+++ b/src/quick3d/imports/scene3d/scene3drenderer.cpp
@@ -161,7 +161,9 @@ Scene3DRenderer::Scene3DRenderer(Scene3DItem *item, Qt3DCore::QAspectEngine *asp
, m_forceRecreate(false)
, m_shouldRender(false)
, m_dirtyViews(false)
+ , m_skipFrame(false)
, m_allowRendering(0)
+ , m_compositingMode(Scene3DItem::FBO)
{
Q_CHECK_PTR(m_item);
Q_CHECK_PTR(m_item->window());
@@ -277,6 +279,19 @@ void Scene3DRenderer::beforeSynchronize()
// We could otherwise enter a deadlock state
if (!m_allowRendering.tryAcquire(std::max(m_allowRendering.available(), 1)))
return;
+
+ // In the case of OnDemand rendering, we still need to get to this
+ // point to ensure we have processed jobs for all aspects.
+ // We also still need to call render() to allow proceeding with the
+ // next frame. However it won't be performing any 3d rendering at all
+ // so we do it here and return early. This prevents a costly QtQuick
+ // SceneGraph update for nothing
+ if (m_skipFrame) {
+ m_skipFrame = false;
+ static_cast<QRenderAspectPrivate*>(QRenderAspectPrivate::get(m_renderAspect))->renderSynchronous(false);
+ return;
+ }
+
m_shouldRender = true;
// Check size / multisampling
@@ -359,6 +374,11 @@ void Scene3DRenderer::setCompositingMode(Scene3DItem::CompositingMode mode)
m_compositingMode = mode;
}
+void Scene3DRenderer::setSkipFrame(bool skip)
+{
+ m_skipFrame = skip;
+}
+
// Main Thread, Render Thread locked
void Scene3DRenderer::setScene3DViews(const QVector<Scene3DView *> views)
{
@@ -422,7 +442,8 @@ void Scene3DRenderer::render()
// Only show the node once Qt3D has rendered to it
// Avoids showing garbage on the first frame
- m_node->show();
+ if (m_node)
+ m_node->show();
}
// Reset the state used by the Qt Quick scenegraph to avoid any
diff --git a/src/quick3d/imports/scene3d/scene3drenderer_p.h b/src/quick3d/imports/scene3d/scene3drenderer_p.h
index 4f3651cd3..08a2c60a3 100644
--- a/src/quick3d/imports/scene3d/scene3drenderer_p.h
+++ b/src/quick3d/imports/scene3d/scene3drenderer_p.h
@@ -87,7 +87,7 @@ public:
void setCleanerHelper(Scene3DCleaner *cleaner);
void allowRender();
void setCompositingMode(Scene3DItem::CompositingMode mode);
-
+ void setSkipFrame(bool skip);
void setScene3DViews(const QVector<Scene3DView *> views);
public Q_SLOTS:
@@ -119,6 +119,7 @@ private:
bool m_forceRecreate;
bool m_shouldRender;
bool m_dirtyViews;
+ bool m_skipFrame;
QSemaphore m_allowRendering;
Scene3DItem::CompositingMode m_compositingMode;
QVector<Scene3DView *> m_views;
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp b/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
index 55538ad1f..cfe39e8c7 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
@@ -76,6 +76,7 @@ Scene3DSGMaterialShader::Scene3DSGMaterialShader()
: QSGMaterialShader()
, m_matrixId(-1)
, m_opacityId(-1)
+ , m_visibleId(-1)
{
}
diff --git a/src/quick3d/imports/scene3d/scene3dview.cpp b/src/quick3d/imports/scene3d/scene3dview.cpp
index 9d298b435..f38d135f0 100644
--- a/src/quick3d/imports/scene3d/scene3dview.cpp
+++ b/src/quick3d/imports/scene3d/scene3dview.cpp
@@ -278,6 +278,8 @@ QSGNode *Scene3DView::updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNode
if (m_dirtyFlags & DirtyTexture) {
fboNode->setTexture(m_texture);
m_dirtyFlags.setFlag(DirtyTexture, false);
+ // Show FBO Node at this point
+ fboNode->show();
}
if (m_dirtyFlags & DirtyNode) {
fboNode->markDirty(QSGNode::DirtyMaterial);
diff --git a/src/quick3d/quick3d/qquaternionanimation.cpp b/src/quick3d/quick3d/qquaternionanimation.cpp
index 22cc905f7..933a08ee4 100644
--- a/src/quick3d/quick3d/qquaternionanimation.cpp
+++ b/src/quick3d/quick3d/qquaternionanimation.cpp
@@ -144,7 +144,7 @@ void QQuaternionAnimation::setType(Type type)
switch (type) {
case Nlerp:
QT_WARNING_PUSH
-QT_WARNING_DISABLE_GCC(-Wcast-function-type)
+QT_WARNING_DISABLE_GCC("-Wcast-function-type")
d->interpolator = reinterpret_cast<QVariantAnimation::Interpolator>(&q_quaternionNlerpInterpolator);
QT_WARNING_POP
break;
diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.cpp b/src/quick3d/quick3dextras/qt3dquickwindow.cpp
index d67dfdc71..043aca8b9 100644
--- a/src/quick3d/quick3dextras/qt3dquickwindow.cpp
+++ b/src/quick3d/quick3dextras/qt3dquickwindow.cpp
@@ -276,7 +276,7 @@ void Qt3DQuickWindow::updateCameraAspectRatio()
Q_D(Qt3DQuickWindow);
if (d->m_camera) {
d->m_camera->setAspectRatio(static_cast<float>(width()) /
- static_cast<float>(height()));
+ std::max(1.f, static_cast<float>(height())));
}
}
diff --git a/src/quick3d/quick3dscene2d/items/qscene2d.cpp b/src/quick3d/quick3dscene2d/items/qscene2d.cpp
index cbdc83e7d..b12adb8ed 100644
--- a/src/quick3d/quick3dscene2d/items/qscene2d.cpp
+++ b/src/quick3d/quick3dscene2d/items/qscene2d.cpp
@@ -52,6 +52,12 @@ namespace Qt3DRender {
namespace Quick {
/*!
+ \namespace Qt3DRender::Quick
+ \inmodule Qt3DScene2D
+ \brief Internal namespace to import QML types.
+*/
+
+/*!
\class Qt3DRender::Quick::QScene2D
\inheaderfile Qt3DQuickScene2D/QScene2D
\inmodule Qt3DScene2D
diff --git a/src/quick3d/quick3dscene2d/items/qscene2d.h b/src/quick3d/quick3dscene2d/items/qscene2d.h
index 2f5c1010e..38eaf7359 100644
--- a/src/quick3d/quick3dscene2d/items/qscene2d.h
+++ b/src/quick3d/quick3dscene2d/items/qscene2d.h
@@ -51,11 +51,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \namespace Qt3DRender::Quick
-
- \brief Internal namespace to import QML types.
-*/
namespace Quick {
class QScene2DPrivate;
diff --git a/src/quick3d/quick3dscene2d/items/scene2d.cpp b/src/quick3d/quick3dscene2d/items/scene2d.cpp
index 981b290e2..a2247705e 100644
--- a/src/quick3d/quick3dscene2d/items/scene2d.cpp
+++ b/src/quick3d/quick3dscene2d/items/scene2d.cpp
@@ -208,11 +208,16 @@ void Scene2D::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime)
if (!entity)
return;
- registerObjectPickerEvents(entity);
+ if (registerObjectPickerEvents(entity))
+ m_entities.push_back(id);
+ else
+ Qt3DCore::QNodePrivate::get(const_cast<Qt3DCore::QNode *>(frontEnd))->update();
}
- for (const auto &id: removedEntities)
+ for (const auto &id: removedEntities) {
+ m_entities.removeOne(id);
unregisterObjectPickerEvents(id);
- m_entities = ids;
+ }
+ std::sort(std::begin(m_entities), std::end(m_entities));
if (firstTime)
setSharedObject(dnode->m_renderManager->m_sharedObject);
@@ -428,8 +433,11 @@ bool Scene2D::registerObjectPickerEvents(Qt3DCore::QEntity *qentity)
{
Entity *entity = nullptr;
if (!resourceAccessor()->accessResource(RenderBackendResourceAccessor::EntityHandle,
- qentity->id(), (void**)&entity, nullptr))
+ qentity->id(), (void**)&entity, nullptr)) {
+ qCWarning(Qt3DRender::Quick::Scene2D) << Q_FUNC_INFO
+ << "Entity not yet available in backend";
return false;
+ }
if (!entity->containsComponentsOfType<ObjectPicker>() ||
!entity->containsComponentsOfType<GeometryRenderer>()) {
diff --git a/src/quick3d/quick3dscene2d/items/scene2dsharedobject.cpp b/src/quick3d/quick3dscene2d/items/scene2dsharedobject.cpp
index cb9973f0a..aed624501 100644
--- a/src/quick3d/quick3dscene2d/items/scene2dsharedobject.cpp
+++ b/src/quick3d/quick3dscene2d/items/scene2dsharedobject.cpp
@@ -59,6 +59,7 @@ Scene2DSharedObject::Scene2DSharedObject(Scene2DManager *manager)
, m_quickWindow(nullptr)
, m_renderManager(manager)
, m_surface(nullptr)
+ , m_renderThread(nullptr)
, m_renderObject(nullptr)
, m_disallowed(false)
, m_quit(false)