summaryrefslogtreecommitdiffstats
path: root/src/api/studio3d
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2019-09-30 09:10:45 +0300
committerTomi Korpipaa <tomi.korpipaa@qt.io>2019-10-01 13:57:23 +0300
commit247e38fcb8c08e8af3e221e32ab0d776cf758da5 (patch)
treea508d0a9f868e53a81df57550474e897d61ee3f1 /src/api/studio3d
parent2902563f2f97fe18e3a547e72e66ee57d443df4f (diff)
Bump qml module version
Revision new APIs: asyncInit, shaderCache, exportShaderCache, stereMode, stereoEyeSeparation, textureId, and addImageProvider. Also fixed missing array in qt_attribution.json Task-number: QT3DS-3963 Change-Id: I3fc6ac38ff6f524a5268ad4706f4d0edcc0af6f3 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/api/studio3d')
-rw-r--r--src/api/studio3d/q3dspresentation.cpp10
-rw-r--r--src/api/studio3d/q3dspresentation.h7
-rw-r--r--src/api/studio3d/q3dsviewersettings.cpp15
-rw-r--r--src/api/studio3d/q3dsviewersettings.h4
4 files changed, 30 insertions, 6 deletions
diff --git a/src/api/studio3d/q3dspresentation.cpp b/src/api/studio3d/q3dspresentation.cpp
index 84a925a..05e2e8e 100644
--- a/src/api/studio3d/q3dspresentation.cpp
+++ b/src/api/studio3d/q3dspresentation.cpp
@@ -613,6 +613,7 @@ void Q3DSPresentation::unloadSlide(const QString &elementPath)
/*!
\qmlmethod Presentation::exportShaderCache(url shaderCacheFile, bool binaryShaders)
+ \since QtStudio3D.OpenGL 2.5
Writes the shaders currently in use to the file specified by \a shaderCacheFile URL.
If \a binaryShaders property is \c{true}, precompiled shaders are exported. Otherwise,
@@ -631,6 +632,7 @@ void Q3DSPresentation::unloadSlide(const QString &elementPath)
\sa shaderCacheFile, shaderCacheExported
*/
/*!
+ \since Qt 3D Studio 2.5
Writes the shaders currently in use to the file specified by \a shaderCacheFile URL.
If \a binaryShaders property is \c{true}, precompiled shaders are exported. Otherwise,
the shader source code is exported.
@@ -657,6 +659,7 @@ void Q3DSPresentation::exportShaderCache(const QUrl &shaderCacheFile, bool binar
/*!
\qmlmethod Presentation::exportShaderCache(bool binaryShaders)
+ \since QtStudio3D.OpenGL 2.5
Exports the shaders currently in use and dumps the resulting cache encoded with base64 into
stderr. This function is provided as a means to extract the shader cache from environments
@@ -680,6 +683,7 @@ void Q3DSPresentation::exportShaderCache(const QUrl &shaderCacheFile, bool binar
\sa shaderCacheFile, shaderCacheExported
*/
/*!
+ \since Qt 3D Studio 2.5
Exports the shaders currently in use and dumps the resulting cache encoded with base64 into
stderr. This function is provided as a means to extract the shader cache from environments
without a writable disk. The base64 output needs to be converted back to binary
@@ -707,6 +711,7 @@ void Q3DSPresentation::exportShaderCache(bool binaryShaders)
/*!
\qmlproperty url Presentation::shaderCacheFile
+ \since QtStudio3D.OpenGL 2.5
Specifies the shader cache file to be used for initial shader initialization.
This property value must be set before the presentation is shown.
@@ -722,6 +727,7 @@ void Q3DSPresentation::exportShaderCache(bool binaryShaders)
\sa exportShaderCache(), shaderCacheExport
*/
/*!
+ \since Qt 3D Studio 2.5
Specifies the shader cache file to be used for initial shader initialization.
This property value must be set before the presentation is shown.
Using cached shaders improves presentation initialization speed.
@@ -750,6 +756,7 @@ void Q3DSPresentation::setShaderCacheFile(const QUrl &fileName)
/*!
\qmlsignal Presentation::shaderCacheExported(bool success)
+ \since QtStudio3D.OpenGL 2.5
Emitted when a shader cache export is completed. The parameter \a success indicates whether
or not the export was successful.
@@ -759,6 +766,7 @@ void Q3DSPresentation::setShaderCacheFile(const QUrl &fileName)
/*!
\fn Q3DSPresentation::shaderCacheExported(bool success)
+ \since Qt 3D Studio 2.5
Emitted when a shader cache export is completed. The parameter \a success indicates whether
or not the export was successful.
@@ -941,6 +949,7 @@ void Q3DSPresentation::setAttribute(const QString &elementPath, const QString &a
}
/*!
+ \since Qt 3D Studio 2.5
Sets the \a provider to use for images requested via the \e
image: url scheme, with host \a providerId. The runtime
takes ownership of \a provider.
@@ -959,6 +968,7 @@ void Q3DSPresentation::addImageProvider(const QString &providerId, QQmlImageProv
}
/*!
+ \since Qt 3D Studio 2.5
Returns the OpenGL texture id associated with a layer or an image specified
by \a elementPath.
diff --git a/src/api/studio3d/q3dspresentation.h b/src/api/studio3d/q3dspresentation.h
index 6822ab0..5210a29 100644
--- a/src/api/studio3d/q3dspresentation.h
+++ b/src/api/studio3d/q3dspresentation.h
@@ -59,7 +59,7 @@ class Q_STUDIO3D_EXPORT Q3DSPresentation : public QObject
Q_PROPERTY(QStringList createdElements READ createdElements NOTIFY elementsCreated)
Q_PROPERTY(QStringList createdMaterials READ createdMaterials NOTIFY materialsCreated)
Q_PROPERTY(QStringList createdMeshes READ createdMeshes NOTIFY meshesCreated)
- Q_PROPERTY(QUrl shaderCacheFile READ shaderCacheFile WRITE setShaderCacheFile NOTIFY shaderCacheFileChanged )
+ Q_PROPERTY(QUrl shaderCacheFile READ shaderCacheFile WRITE setShaderCacheFile NOTIFY shaderCacheFileChanged REVISION 1)
public:
explicit Q3DSPresentation(QObject *parent = nullptr);
@@ -92,8 +92,9 @@ public:
Q_INVOKABLE void preloadSlide(const QString &elementPath);
Q_INVOKABLE void unloadSlide(const QString &elementPath);
- Q_INVOKABLE void exportShaderCache(const QUrl &shaderCacheFile, bool binaryShaders);
- Q_INVOKABLE void exportShaderCache(bool binaryShaders);
+ Q_REVISION(1) Q_INVOKABLE void exportShaderCache(const QUrl &shaderCacheFile,
+ bool binaryShaders);
+ Q_REVISION(1) Q_INVOKABLE void exportShaderCache(bool binaryShaders);
QUrl shaderCacheFile() const;
// Input event handlers
diff --git a/src/api/studio3d/q3dsviewersettings.cpp b/src/api/studio3d/q3dsviewersettings.cpp
index ead4eb9..eb62c32 100644
--- a/src/api/studio3d/q3dsviewersettings.cpp
+++ b/src/api/studio3d/q3dsviewersettings.cpp
@@ -231,7 +231,7 @@ void Q3DSViewerSettings::setScaleMode(Q3DSViewerSettings::ScaleMode mode)
/*!
\qmlproperty enumeration ViewerSettings::stereoMode
- \since Qt 3D Studio 2.5
+ \since QtStudio3D.OpenGL 2.5
Specifies the stereo mode. The default value \c is StereoModeMono where the
view is rendered normally, as suitable for 2D displays. Other available modes
@@ -272,6 +272,19 @@ void Q3DSViewerSettings::setStereoMode(Q3DSViewerSettings::StereoMode mode)
}
/*!
+ \qmlproperty real ViewerSettings::stereoEyeSeparation
+
+ \since QtStudio3D.OpenGL 2.5
+
+ Specifies the eye (camera) separation of stereo rendering.
+ Value is the amount left and right eye cameras move in x-coordinate
+ values away from center. Bigger separation increases the 3D effect.
+ Optimal value depends on viewed presentation.
+
+ This has only effect when stereo mode is set to something else than
+ default \c{StereoModeMono}.
+ */
+/*!
\property Q3DSViewerSettings::stereoEyeSeparation
\since Qt 3D Studio 2.5
diff --git a/src/api/studio3d/q3dsviewersettings.h b/src/api/studio3d/q3dsviewersettings.h
index 0d78e1b..1099e35 100644
--- a/src/api/studio3d/q3dsviewersettings.h
+++ b/src/api/studio3d/q3dsviewersettings.h
@@ -50,8 +50,8 @@ class Q_STUDIO3D_EXPORT Q3DSViewerSettings : public QObject
Q_PROPERTY(QColor matteColor READ matteColor WRITE setMatteColor NOTIFY matteColorChanged)
Q_PROPERTY(bool showRenderStats READ isShowRenderStats WRITE setShowRenderStats NOTIFY showRenderStatsChanged)
Q_PROPERTY(ScaleMode scaleMode READ scaleMode WRITE setScaleMode NOTIFY scaleModeChanged)
- Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode NOTIFY stereoModeChanged)
- Q_PROPERTY(double stereoEyeSeparation READ stereoEyeSeparation WRITE setStereoEyeSeparation NOTIFY stereoEyeSeparationChanged)
+ Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode NOTIFY stereoModeChanged REVISION 1)
+ Q_PROPERTY(double stereoEyeSeparation READ stereoEyeSeparation WRITE setStereoEyeSeparation NOTIFY stereoEyeSeparationChanged REVISION 1)
public:
enum ShadeMode {