diff options
author | Liang Qi <liang.qi@qt.io> | 2019-09-30 14:59:22 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-09-30 14:59:22 +0200 |
commit | eb9f68599f1d94b8ee578ea18b3e3e5297cce73d (patch) | |
tree | ab4d226556f83de7e24246f1995500be51533f04 | |
parent | 4bae053c5dd756444c415bd6ddb121f7e3873b83 (diff) | |
parent | c40cccb0b4485045db61c2d4e825e33a68c58861 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
src/render/texture/qtexture.cpp
Change-Id: Ibc0b8d87c172ea8fac521b2c85d2b2a42c5fc290
-rw-r--r-- | src/extras/defaults/qabstractcameracontroller.cpp | 4 | ||||
-rw-r--r-- | src/input/frontend/qaxis.cpp | 4 | ||||
-rw-r--r-- | src/render/texture/qtexture.cpp | 25 |
3 files changed, 31 insertions, 2 deletions
diff --git a/src/extras/defaults/qabstractcameracontroller.cpp b/src/extras/defaults/qabstractcameracontroller.cpp index 27df65d7b..c8ebf42f3 100644 --- a/src/extras/defaults/qabstractcameracontroller.cpp +++ b/src/extras/defaults/qabstractcameracontroller.cpp @@ -211,6 +211,10 @@ void QAbstractCameraControllerPrivate::init() m_logicalDevice, &Qt3DInput::QLogicalDevice::setEnabled); QObject::connect(q, &Qt3DCore::QEntity::enabledChanged, m_frameAction, &Qt3DLogic::QFrameAction::setEnabled); + for (auto axis: {m_rxAxis, m_ryAxis, m_txAxis, m_tyAxis, m_tzAxis}) { + QObject::connect(q, &Qt3DCore::QEntity::enabledChanged, + axis, &Qt3DInput::QAxis::setEnabled); + } QObject::connect(m_escapeButtonAction, &Qt3DInput::QAction::activeChanged, q, [this](bool isActive) { diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp index 01e28e9cf..1830c8005 100644 --- a/src/input/frontend/qaxis.cpp +++ b/src/input/frontend/qaxis.cpp @@ -83,6 +83,10 @@ namespace Qt3DInput { QAxis::QAxis(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QAxisPrivate(), parent) { + Q_D(QAxis); + connect(this, &QAxis::enabledChanged, [d]() { + d->setValue(0.); + }); } /*! \internal */ diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp index 5a6adece3..734942847 100644 --- a/src/render/texture/qtexture.cpp +++ b/src/render/texture/qtexture.cpp @@ -1156,6 +1156,7 @@ void TextureDownloadRequest::onCompleted() /*! \class Qt3DRender::QTexture1D + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target1D target format. @@ -1176,6 +1177,7 @@ QTexture1D::~QTexture1D() /*! \class Qt3DRender::QTexture1DArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target1DArray target format. @@ -1196,6 +1198,7 @@ QTexture1DArray::~QTexture1DArray() /*! \class Qt3DRender::QTexture2D + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2D target format. @@ -1216,6 +1219,7 @@ QTexture2D::~QTexture2D() /*! \class Qt3DRender::QTexture2DArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2DArray target format. @@ -1236,6 +1240,7 @@ QTexture2DArray::~QTexture2DArray() /*! \class Qt3DRender::QTexture3D + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target3D target format. @@ -1256,6 +1261,7 @@ QTexture3D::~QTexture3D() /*! \class Qt3DRender::QTextureCubeMap + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetCubeMap target format. @@ -1276,6 +1282,7 @@ QTextureCubeMap::~QTextureCubeMap() /*! \class Qt3DRender::QTextureCubeMapArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetCubeMapArray target format. @@ -1296,6 +1303,7 @@ QTextureCubeMapArray::~QTextureCubeMapArray() /*! \class Qt3DRender::QTexture2DMultisample + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2DMultisample target format. @@ -1316,6 +1324,7 @@ QTexture2DMultisample::~QTexture2DMultisample() /*! \class Qt3DRender::QTexture2DMultisampleArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2DMultisampleArray target format. @@ -1336,6 +1345,7 @@ QTexture2DMultisampleArray::~QTexture2DMultisampleArray() /*! \class Qt3DRender::QTextureRectangle + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetRectangle target format. @@ -1356,6 +1366,7 @@ QTextureRectangle::~QTextureRectangle() /*! \class Qt3DRender::QTextureBuffer + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetBuffer target format. @@ -1395,6 +1406,7 @@ void QTextureLoaderPrivate::updateGenerator() /*! \class Qt3DRender::QTextureLoader + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \brief Handles the texture loading and setting the texture's properties. */ @@ -1608,8 +1620,9 @@ bool QTextureFromSourceGenerator::isMirrored() const } /*! - * \class QSharedGLTexture + * \class Qt3DRender::QSharedGLTexture * \inmodule Qt3DRender + * \inheaderfile Qt3DRender/QTexture * \brief Allows to use a textureId from a separate OpenGL context in a Qt 3D scene. * * Depending on the rendering mode used by Qt 3D, the shared context will either be: @@ -1636,6 +1649,14 @@ bool QTextureFromSourceGenerator::isMirrored() const * specify the correct sampler type to be used. */ +/*! + \qmltype SharedGLTexture + \instantiates Qt3DRender::QSharedGLTexture + \inqmlmodule Qt3D.Render + \brief Allows to use a textureId from a separate OpenGL context in a Qt 3D scene. + \since 5.13 +*/ + QSharedGLTexture::QSharedGLTexture(Qt3DCore::QNode *parent) : QAbstractTexture(parent) { @@ -1648,7 +1669,7 @@ QSharedGLTexture::~QSharedGLTexture() } /*! - * \qmlproperty textureId + * \qmlproperty int SharedGLTexture::textureId * * The OpenGL texture id value that you want Qt3D to gain access to. */ |