From bd3aa578b8d822840fc3d4a6ef819b29b2c26034 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 5 Sep 2019 13:49:19 +0200 Subject: Doc: Fix documentation issues for Qt3DRender::QTexture* classes Fixes: QTWEBSITE-878 Change-Id: I8a4ac1de75dfb8ec4ff784a01d3e4abbc031a7ba Reviewed-by: Venugopal Shivashankar --- src/render/texture/qtexture.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp index 0e652c6ff..59857ea53 100644 --- a/src/render/texture/qtexture.cpp +++ b/src/render/texture/qtexture.cpp @@ -1036,6 +1036,7 @@ void TextureDownloadRequest::onCompleted() /*! \class Qt3DRender::QTexture1D + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target1D target format. @@ -1056,6 +1057,7 @@ QTexture1D::~QTexture1D() /*! \class Qt3DRender::QTexture1DArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target1DArray target format. @@ -1076,6 +1078,7 @@ QTexture1DArray::~QTexture1DArray() /*! \class Qt3DRender::QTexture2D + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2D target format. @@ -1096,6 +1099,7 @@ QTexture2D::~QTexture2D() /*! \class Qt3DRender::QTexture2DArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2DArray target format. @@ -1116,6 +1120,7 @@ QTexture2DArray::~QTexture2DArray() /*! \class Qt3DRender::QTexture3D + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target3D target format. @@ -1136,6 +1141,7 @@ QTexture3D::~QTexture3D() /*! \class Qt3DRender::QTextureCubeMap + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetCubeMap target format. @@ -1156,6 +1162,7 @@ QTextureCubeMap::~QTextureCubeMap() /*! \class Qt3DRender::QTextureCubeMapArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetCubeMapArray target format. @@ -1176,6 +1183,7 @@ QTextureCubeMapArray::~QTextureCubeMapArray() /*! \class Qt3DRender::QTexture2DMultisample + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2DMultisample target format. @@ -1196,6 +1204,7 @@ QTexture2DMultisample::~QTexture2DMultisample() /*! \class Qt3DRender::QTexture2DMultisampleArray + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a Target2DMultisampleArray target format. @@ -1216,6 +1225,7 @@ QTexture2DMultisampleArray::~QTexture2DMultisampleArray() /*! \class Qt3DRender::QTextureRectangle + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetRectangle target format. @@ -1236,6 +1246,7 @@ QTextureRectangle::~QTextureRectangle() /*! \class Qt3DRender::QTextureBuffer + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \since 5.5 \brief A QAbstractTexture with a TargetBuffer target format. @@ -1275,6 +1286,7 @@ void QTextureLoaderPrivate::updateGenerator() /*! \class Qt3DRender::QTextureLoader + \inheaderfile Qt3DRender/QTexture \inmodule Qt3DRender \brief Handles the texture loading and setting the texture's properties. */ @@ -1488,7 +1500,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: @@ -1515,6 +1529,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) { @@ -1527,7 +1549,7 @@ QSharedGLTexture::~QSharedGLTexture() } /*! - * \qmlproperty textureId + * \qmlproperty int SharedGLTexture::textureId * * The OpenGL texture id value that you want Qt3D to gain access to. */ -- cgit v1.2.3 From c40cccb0b4485045db61c2d4e825e33a68c58861 Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Fri, 27 Sep 2019 15:09:00 +0100 Subject: Reset input axis changes when enabling camera controller When input axis are enabled or disable, we now reset the value to 0. And enabling or disabling the camera controller, we now do the same for the axis. This prevents residual movement when re-enabling the controller due to the asynchronous updates. Task-number: QTBUG-77996 Change-Id: I5ac016d5b708e1f8d8eaa996bbd28c00c0f05e79 Reviewed-by: Paul Lemire --- src/extras/defaults/qabstractcameracontroller.cpp | 4 ++++ src/input/frontend/qaxis.cpp | 4 ++++ 2 files changed, 8 insertions(+) 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 */ -- cgit v1.2.3