summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/defaults/qdiffusemapmaterial.cpp4
-rw-r--r--src/render/defaults/qdiffusespecularmapmaterial.cpp4
-rw-r--r--src/render/defaults/qforwardrenderer.cpp4
-rw-r--r--src/render/defaults/qgoochmaterial.cpp4
-rw-r--r--src/render/defaults/qnormaldiffusemapalphamaterial.cpp4
-rw-r--r--src/render/defaults/qnormaldiffusemapmaterial.cpp4
-rw-r--r--src/render/defaults/qnormaldiffusespecularmapmaterial.cpp4
-rw-r--r--src/render/defaults/qpervertexcolormaterial.cpp4
-rw-r--r--src/render/defaults/qphongalphamaterial.cpp13
-rw-r--r--src/render/defaults/qphongmaterial.cpp4
-rw-r--r--src/render/defaults/qskyboxentity.cpp4
-rw-r--r--src/render/framegraph/qcameraselector.cpp4
-rw-r--r--src/render/framegraph/qclearbuffer.cpp4
-rw-r--r--src/render/framegraph/qframegraph.cpp4
-rw-r--r--src/render/framegraph/qframegraphnode.cpp4
-rw-r--r--src/render/framegraph/qframegraphselector.cpp4
-rw-r--r--src/render/framegraph/qlayerfilter.cpp4
-rw-r--r--src/render/framegraph/qrenderpassfilter.cpp4
-rw-r--r--src/render/framegraph/qrendertargetselector.cpp4
-rw-r--r--src/render/framegraph/qsortcriterion.cpp4
-rw-r--r--src/render/framegraph/qsortmethod.cpp4
-rw-r--r--src/render/framegraph/qstateset.cpp4
-rw-r--r--src/render/framegraph/qtechniquefilter.cpp4
-rw-r--r--src/render/framegraph/qviewport.cpp4
-rw-r--r--src/render/frontend/qcameralens.cpp1
-rw-r--r--src/render/frontend/qlayer.cpp4
-rw-r--r--src/render/frontend/qrenderaspect.cpp4
-rw-r--r--src/render/frontend/qrenderattachment.cpp4
-rw-r--r--src/render/frontend/qrendertarget.cpp4
-rw-r--r--src/render/geometry/qabstractattribute.cpp131
-rw-r--r--src/render/geometry/qabstractbuffer.cpp45
-rw-r--r--src/render/geometry/qboundingvolumespecifier.cpp28
-rw-r--r--src/render/geometry/qbuffer.cpp134
-rw-r--r--src/render/geometry/qcuboidgeometry.cpp150
-rw-r--r--src/render/geometry/qcuboidmesh.cpp88
-rw-r--r--src/render/geometry/qcylindergeometry.cpp116
-rw-r--r--src/render/geometry/qcylindermesh.cpp66
-rw-r--r--src/render/geometry/qgeometry.cpp67
-rw-r--r--src/render/geometry/qgeometryrenderer.cpp142
-rw-r--r--src/render/geometry/qmesh.cpp57
-rw-r--r--src/render/geometry/qplanegeometry.cpp116
-rw-r--r--src/render/geometry/qplanemesh.cpp55
-rw-r--r--src/render/geometry/qspheregeometry.cpp127
-rw-r--r--src/render/geometry/qspheremesh.cpp66
-rw-r--r--src/render/geometry/qtorusgeometry.cpp116
-rw-r--r--src/render/geometry/qtorusmesh.cpp66
-rw-r--r--src/render/io/qabstractsceneloader.cpp4
-rw-r--r--src/render/lights/qdirectionallight.cpp4
-rw-r--r--src/render/lights/qlight.cpp6
-rw-r--r--src/render/lights/qpointlight.cpp4
-rw-r--r--src/render/lights/qspotlight.cpp4
-rw-r--r--src/render/materialsystem/qannotation.cpp4
-rw-r--r--src/render/materialsystem/qeffect.cpp4
-rw-r--r--src/render/materialsystem/qmaterial.cpp11
-rw-r--r--src/render/materialsystem/qparameter.cpp4
-rw-r--r--src/render/materialsystem/qparametermapping.cpp7
-rw-r--r--src/render/materialsystem/qrenderpass.cpp4
-rw-r--r--src/render/materialsystem/qshaderdata.cpp4
-rw-r--r--src/render/materialsystem/qshaderprogram.cpp4
-rw-r--r--src/render/materialsystem/qtechnique.cpp4
-rw-r--r--src/render/materialsystem/shader.cpp6
-rw-r--r--src/render/materialsystem/shader_p.h4
-rw-r--r--src/render/materialsystem/shaderdata.cpp8
-rw-r--r--src/render/materialsystem/shaderdata_p.h2
-rw-r--r--src/render/renderstates/qrenderstate.cpp4
-rw-r--r--src/render/shaders/es2/light.inc.frag100176
-rw-r--r--src/render/texture/qabstracttextureimage.cpp4
-rw-r--r--src/render/texture/qabstracttextureprovider.cpp4
-rw-r--r--src/render/texture/texture.cpp12
-rw-r--r--src/render/texture/texture_p.h2
70 files changed, 1570 insertions, 412 deletions
diff --git a/src/render/defaults/qdiffusemapmaterial.cpp b/src/render/defaults/qdiffusemapmaterial.cpp
index 532cb7092..22937ce3b 100644
--- a/src/render/defaults/qdiffusemapmaterial.cpp
+++ b/src/render/defaults/qdiffusemapmaterial.cpp
@@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QDiffuseMapMaterialPrivate
- \internal
-*/
QDiffuseMapMaterialPrivate::QDiffuseMapMaterialPrivate()
: QMaterialPrivate()
, m_diffuseMapEffect(new QEffect())
diff --git a/src/render/defaults/qdiffusespecularmapmaterial.cpp b/src/render/defaults/qdiffusespecularmapmaterial.cpp
index b401239a3..2a24d417d 100644
--- a/src/render/defaults/qdiffusespecularmapmaterial.cpp
+++ b/src/render/defaults/qdiffusespecularmapmaterial.cpp
@@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QDiffuseSpecularMapMaterialPrivate
- \internal
-*/
QDiffuseSpecularMapMaterialPrivate::QDiffuseSpecularMapMaterialPrivate()
: QMaterialPrivate()
, m_diffuseSpecularMapEffect(new QEffect())
diff --git a/src/render/defaults/qforwardrenderer.cpp b/src/render/defaults/qforwardrenderer.cpp
index 934456631..15dbdbf26 100644
--- a/src/render/defaults/qforwardrenderer.cpp
+++ b/src/render/defaults/qforwardrenderer.cpp
@@ -51,10 +51,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QForwardRendererPrivate
- \internal
-*/
QForwardRendererPrivate::QForwardRendererPrivate()
: QTechniqueFilterPrivate()
, m_surfaceSelector(new QRenderSurfaceSelector)
diff --git a/src/render/defaults/qgoochmaterial.cpp b/src/render/defaults/qgoochmaterial.cpp
index 027544c3d..ac5c44eb6 100644
--- a/src/render/defaults/qgoochmaterial.cpp
+++ b/src/render/defaults/qgoochmaterial.cpp
@@ -52,10 +52,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QGoochMaterialPrivate
- \internal
-*/
QGoochMaterialPrivate::QGoochMaterialPrivate()
: QMaterialPrivate()
, m_effect(new QEffect)
diff --git a/src/render/defaults/qnormaldiffusemapalphamaterial.cpp b/src/render/defaults/qnormaldiffusemapalphamaterial.cpp
index bca337627..075c55d5d 100644
--- a/src/render/defaults/qnormaldiffusemapalphamaterial.cpp
+++ b/src/render/defaults/qnormaldiffusemapalphamaterial.cpp
@@ -59,10 +59,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QNormalDiffuseMapAlphaMaterialPrivate
- \internal
-*/
QNormalDiffuseMapAlphaMaterialPrivate::QNormalDiffuseMapAlphaMaterialPrivate()
: QNormalDiffuseMapMaterialPrivate()
, m_alphaCoverage(new QAlphaCoverage())
diff --git a/src/render/defaults/qnormaldiffusemapmaterial.cpp b/src/render/defaults/qnormaldiffusemapmaterial.cpp
index a299d58c5..1af69b29a 100644
--- a/src/render/defaults/qnormaldiffusemapmaterial.cpp
+++ b/src/render/defaults/qnormaldiffusemapmaterial.cpp
@@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QNormalDiffuseMapMaterialPrivate
- \internal
-*/
QNormalDiffuseMapMaterialPrivate::QNormalDiffuseMapMaterialPrivate()
: QMaterialPrivate()
, m_normalDiffuseEffect(new QEffect())
diff --git a/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp b/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp
index e128352a5..99fed1f98 100644
--- a/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp
+++ b/src/render/defaults/qnormaldiffusespecularmapmaterial.cpp
@@ -56,10 +56,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QNormalDiffuseSpecularMapMaterialPrivate
- \internal
-*/
QNormalDiffuseSpecularMapMaterialPrivate::QNormalDiffuseSpecularMapMaterialPrivate()
: QMaterialPrivate()
, m_normalDiffuseSpecularEffect(new QEffect())
diff --git a/src/render/defaults/qpervertexcolormaterial.cpp b/src/render/defaults/qpervertexcolormaterial.cpp
index 7f6a88d36..caba25882 100644
--- a/src/render/defaults/qpervertexcolormaterial.cpp
+++ b/src/render/defaults/qpervertexcolormaterial.cpp
@@ -55,10 +55,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QPerVertexColorMaterialPrivate
- \internal
-*/
QPerVertexColorMaterialPrivate::QPerVertexColorMaterialPrivate()
: QMaterialPrivate()
, m_vertexEffect(new QEffect())
diff --git a/src/render/defaults/qphongalphamaterial.cpp b/src/render/defaults/qphongalphamaterial.cpp
index 5dc3c7b4e..78480f53b 100644
--- a/src/render/defaults/qphongalphamaterial.cpp
+++ b/src/render/defaults/qphongalphamaterial.cpp
@@ -58,10 +58,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QPhongAlphaMaterialPrivate
- \internal
-*/
QPhongAlphaMaterialPrivate::QPhongAlphaMaterialPrivate()
: QMaterialPrivate()
, m_phongEffect(new QEffect())
@@ -200,8 +196,7 @@ void QPhongAlphaMaterialPrivate::handleAlphaChanged(const QVariant &var)
\class Qt3DRender::QPhongAlphaMaterial
\brief The QPhongAlphaMaterial class provides a default implementation of
- the phong lighting effect with alpha
-.
+ the phong lighting effect with alpha.
\inmodule Qt3DRenderer
\since 5.5
@@ -221,7 +216,7 @@ void QPhongAlphaMaterialPrivate::handleAlphaChanged(const QVariant &var)
*/
/*!
- \fn Qt3DRender::QPhongAlphaMaterial::QPhongAlphaMaterial(QNode *parent)
+ \fn Qt3DRender::QPhongAlphaMaterial::QPhongAlphaMaterial(Qt3DCore::QNode *parent)
Constructs a new QPhongAlphaMaterial instance with parent object \a parent.
*/
@@ -233,8 +228,6 @@ QPhongAlphaMaterial::QPhongAlphaMaterial(QNode *parent)
}
/*!
- \fn Qt3DRender::QPhongAlphaMaterial::~QPhongAlphaMaterial()
-
Destroys the QPhongAlphaMaterial.
*/
QPhongAlphaMaterial::~QPhongAlphaMaterial()
@@ -264,7 +257,7 @@ QColor QPhongAlphaMaterial::diffuse() const
}
/*!
- \property QColor Qt3DRender::QPhongAlphaMaterial::specular
+ \property Qt3DRender::QPhongAlphaMaterial::specular
Holds the specular color.
*/
diff --git a/src/render/defaults/qphongmaterial.cpp b/src/render/defaults/qphongmaterial.cpp
index f5c4cd0ca..3e70f707e 100644
--- a/src/render/defaults/qphongmaterial.cpp
+++ b/src/render/defaults/qphongmaterial.cpp
@@ -55,10 +55,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QPhongMaterialPrivate
- \internal
-*/
QPhongMaterialPrivate::QPhongMaterialPrivate()
: QMaterialPrivate()
, m_phongEffect(new QEffect())
diff --git a/src/render/defaults/qskyboxentity.cpp b/src/render/defaults/qskyboxentity.cpp
index eb71f3f95..e14651787 100644
--- a/src/render/defaults/qskyboxentity.cpp
+++ b/src/render/defaults/qskyboxentity.cpp
@@ -60,10 +60,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- * \class Qt3DRender::QSkyboxEntityPrivate
- * \internal
- */
QSkyboxEntityPrivate::QSkyboxEntityPrivate()
: QEntityPrivate()
, m_effect(new QEffect())
diff --git a/src/render/framegraph/qcameraselector.cpp b/src/render/framegraph/qcameraselector.cpp
index 813ec2663..4dbea3c89 100644
--- a/src/render/framegraph/qcameraselector.cpp
+++ b/src/render/framegraph/qcameraselector.cpp
@@ -58,10 +58,6 @@ QCameraSelector::QCameraSelector(QCameraSelectorPrivate &dd, QNode *parent)
{
}
-/*!
- \class Qt3DRender::QCameraSelectorPrivate
- \internal
-*/
QCameraSelectorPrivate::QCameraSelectorPrivate()
: QFrameGraphNodePrivate()
, m_camera(Q_NULLPTR)
diff --git a/src/render/framegraph/qclearbuffer.cpp b/src/render/framegraph/qclearbuffer.cpp
index bdc4c1737..80a6a418c 100644
--- a/src/render/framegraph/qclearbuffer.cpp
+++ b/src/render/framegraph/qclearbuffer.cpp
@@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QClearBufferPrivate
- \internal
-*/
QClearBufferPrivate::QClearBufferPrivate()
: QFrameGraphNodePrivate()
, m_buffersType(QClearBuffer::None)
diff --git a/src/render/framegraph/qframegraph.cpp b/src/render/framegraph/qframegraph.cpp
index 57c70c746..9b18b2cd4 100644
--- a/src/render/framegraph/qframegraph.cpp
+++ b/src/render/framegraph/qframegraph.cpp
@@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QFrameGraphPrivate
- \internal
-*/
QFrameGraphPrivate::QFrameGraphPrivate()
: QComponentPrivate()
, m_activeFrameGraph(Q_NULLPTR)
diff --git a/src/render/framegraph/qframegraphnode.cpp b/src/render/framegraph/qframegraphnode.cpp
index 836c5972c..d78040149 100644
--- a/src/render/framegraph/qframegraphnode.cpp
+++ b/src/render/framegraph/qframegraphnode.cpp
@@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QFrameGraphNodePrivate
- \internal
-*/
QFrameGraphNodePrivate::QFrameGraphNodePrivate()
: QNodePrivate()
, m_enabled(true)
diff --git a/src/render/framegraph/qframegraphselector.cpp b/src/render/framegraph/qframegraphselector.cpp
index 9d7e58869..e5a4e463a 100644
--- a/src/render/framegraph/qframegraphselector.cpp
+++ b/src/render/framegraph/qframegraphselector.cpp
@@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QFrameGraphSelectorPrivate
- \internal
-*/
QFrameGraphSelectorPrivate::QFrameGraphSelectorPrivate()
: QFrameGraphNodePrivate()
{
diff --git a/src/render/framegraph/qlayerfilter.cpp b/src/render/framegraph/qlayerfilter.cpp
index 196fb3289..b58922dab 100644
--- a/src/render/framegraph/qlayerfilter.cpp
+++ b/src/render/framegraph/qlayerfilter.cpp
@@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QLayerFilterPrivate
- \internal
-*/
QLayerFilterPrivate::QLayerFilterPrivate()
: QFrameGraphNodePrivate()
{
diff --git a/src/render/framegraph/qrenderpassfilter.cpp b/src/render/framegraph/qrenderpassfilter.cpp
index 3069ea04d..1b58eee71 100644
--- a/src/render/framegraph/qrenderpassfilter.cpp
+++ b/src/render/framegraph/qrenderpassfilter.cpp
@@ -50,10 +50,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QRenderPassFilterPrivate
- \internal
-*/
QRenderPassFilter::QRenderPassFilter(QNode *parent)
: QFrameGraphNode(*new QRenderPassFilterPrivate, parent)
diff --git a/src/render/framegraph/qrendertargetselector.cpp b/src/render/framegraph/qrendertargetselector.cpp
index 1607b9be8..d97064d3a 100644
--- a/src/render/framegraph/qrendertargetselector.cpp
+++ b/src/render/framegraph/qrendertargetselector.cpp
@@ -49,10 +49,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QRenderTargetSelectorPrivate
- \internal
-*/
QRenderTargetSelectorPrivate::QRenderTargetSelectorPrivate()
: QFrameGraphNodePrivate()
, m_target(Q_NULLPTR)
diff --git a/src/render/framegraph/qsortcriterion.cpp b/src/render/framegraph/qsortcriterion.cpp
index 06a2f89d8..c83647854 100644
--- a/src/render/framegraph/qsortcriterion.cpp
+++ b/src/render/framegraph/qsortcriterion.cpp
@@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QSortCriterionPrivate
- \internal
-*/
QSortCriterionPrivate::QSortCriterionPrivate()
: QNodePrivate()
, m_sort(QSortCriterion::StateChangeCost)
diff --git a/src/render/framegraph/qsortmethod.cpp b/src/render/framegraph/qsortmethod.cpp
index bea446945..f0edc4f04 100644
--- a/src/render/framegraph/qsortmethod.cpp
+++ b/src/render/framegraph/qsortmethod.cpp
@@ -49,10 +49,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QSortMethodPrivate
- \internal
-*/
QSortMethodPrivate::QSortMethodPrivate()
: QFrameGraphNodePrivate()
{
diff --git a/src/render/framegraph/qstateset.cpp b/src/render/framegraph/qstateset.cpp
index bfe7d82fe..48ca6fcd1 100644
--- a/src/render/framegraph/qstateset.cpp
+++ b/src/render/framegraph/qstateset.cpp
@@ -49,10 +49,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QStateSetPrivate
- \internal
-*/
QStateSetPrivate::QStateSetPrivate()
: QFrameGraphNodePrivate()
{
diff --git a/src/render/framegraph/qtechniquefilter.cpp b/src/render/framegraph/qtechniquefilter.cpp
index 578ba2f0c..ea0c2bb87 100644
--- a/src/render/framegraph/qtechniquefilter.cpp
+++ b/src/render/framegraph/qtechniquefilter.cpp
@@ -50,10 +50,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QTechniqueFilterPrivate
- \internal
-*/
QTechniqueFilterPrivate::QTechniqueFilterPrivate()
: QFrameGraphNodePrivate()
{
diff --git a/src/render/framegraph/qviewport.cpp b/src/render/framegraph/qviewport.cpp
index 80297424f..8aee112e4 100644
--- a/src/render/framegraph/qviewport.cpp
+++ b/src/render/framegraph/qviewport.cpp
@@ -46,10 +46,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QViewportPrivate
- \internal
-*/
QViewportPrivate::QViewportPrivate()
: QFrameGraphNodePrivate()
, m_rect(QRectF(0.0f, 0.0f, 1.0f, 1.0f))
diff --git a/src/render/frontend/qcameralens.cpp b/src/render/frontend/qcameralens.cpp
index 9587a266e..5946341c8 100644
--- a/src/render/frontend/qcameralens.cpp
+++ b/src/render/frontend/qcameralens.cpp
@@ -428,6 +428,7 @@ QMatrix4x4 QCameraLens::projectionMatrix() const
\inqmlmodule Qt3D.Core
\inherits Component3D
\since 5.5
+ \brief Provides the projection matrix that is used to define a Camera for 3D scene.
*/
/*!
diff --git a/src/render/frontend/qlayer.cpp b/src/render/frontend/qlayer.cpp
index 116e964d6..34bfdbddc 100644
--- a/src/render/frontend/qlayer.cpp
+++ b/src/render/frontend/qlayer.cpp
@@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QLayerPrivate
- \internal
-*/
QLayerPrivate::QLayerPrivate()
: QComponentPrivate()
{
diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp
index fb99d0640..184c3b433 100644
--- a/src/render/frontend/qrenderaspect.cpp
+++ b/src/render/frontend/qrenderaspect.cpp
@@ -149,10 +149,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QRenderAspectPrivate
- \internal
-*/
QRenderAspectPrivate::QRenderAspectPrivate(QRenderAspect::RenderType type)
: QAbstractAspectPrivate()
, m_nodeManagers(new Render::NodeManagers())
diff --git a/src/render/frontend/qrenderattachment.cpp b/src/render/frontend/qrenderattachment.cpp
index 05d0682ee..7236d0e5a 100644
--- a/src/render/frontend/qrenderattachment.cpp
+++ b/src/render/frontend/qrenderattachment.cpp
@@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QRenderAttachmentPrivate
- \internal
-*/
QRenderAttachmentPrivate::QRenderAttachmentPrivate()
: QNodePrivate()
, m_texture(Q_NULLPTR)
diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp
index c92cfe9aa..f0091b449 100644
--- a/src/render/frontend/qrendertarget.cpp
+++ b/src/render/frontend/qrendertarget.cpp
@@ -48,10 +48,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QRenderTargetPrivate
- \internal
-*/
QRenderTargetPrivate::QRenderTargetPrivate()
: QComponentPrivate()
{
diff --git a/src/render/geometry/qabstractattribute.cpp b/src/render/geometry/qabstractattribute.cpp
index 9c37d69f9..579ca6aaa 100644
--- a/src/render/geometry/qabstractattribute.cpp
+++ b/src/render/geometry/qabstractattribute.cpp
@@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QAbstractAttributePrivate
- \internal
-*/
QAbstractAttributePrivate::QAbstractAttributePrivate()
: QNodePrivate()
, m_buffer(Q_NULLPTR)
@@ -65,16 +61,89 @@ QAbstractAttributePrivate::QAbstractAttributePrivate()
{
}
+/*!
+ * \qmltype AbstractAttribute
+ * \instantiates Qt3DRender::QAbstractAttribute
+ * \inqmlmodule Qt3D.Render
+ * \brief Uncreatable
+ */
+
+/*!
+ * \class Qt3DRender::QAbstractAttribute
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DCore::QNode
+ *
+ * Abstract class.
+ */
+
+/*!
+ * \typedef Qt3DRender::QAbstractBufferPtr
+ * \relates Qt3DRender::QAbstractAttribute
+ */
+
+/*!
+ * \fn QVector<QVector4D> Qt3DRender::QAbstractAttribute::asVector4D() const
+ */
+
+/*!
+ * \fn QVector<QVector3D> Qt3DRender::QAbstractAttribute::asVector3D() const
+ */
+
+/*!
+ * \fn QVector<QVector2D> Qt3DRender::QAbstractAttribute::asVector2D() const
+ */
+
+/*!
+ * \fn void Qt3DRender::QAbstractAttribute::dump(int count)
+ * \a count
+ */
+
+/*!
+ * \enum QAbstractAttribute::AttributeType
+ *
+ * The type of the attribute.
+ *
+ * \value VertexAttribute
+ * \value IndexAttribute
+ */
+
+/*!
+ * \enum QAbstractAttribute::DataType
+ *
+ * The type of the data.
+ *
+ * \value Byte
+ * \value UnsignedByte
+ * \value Short
+ * \value UnsignedShort
+ * \value Int
+ * \value UnsignedInt
+ * \value HalfFloat
+ * \value Float
+ * \value Double
+ */
+
+/*!
+ * Constructs a new QAbstractAttribute with \a parent.
+ */
QAbstractAttribute::QAbstractAttribute(QNode *parent)
: QNode(*new QAbstractAttributePrivate(), parent)
{
}
+/*!
+ * Destroys the abstract attribute.
+ */
QAbstractAttribute::~QAbstractAttribute()
{
Q_ASSERT_X(Qt3DCore::QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DRender::QAbstractAttribute subclass didn't call QNode::cleanup in its destructor");
}
+/*!
+ * Constructs a new QAbstractAttribute from \a buf of \a type, \a dataSize, \a count, \a offset,
+ * and \a stride with \a parent.
+ */
QAbstractAttribute::QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint dataSize, uint count, uint offset, uint stride, QNode *parent)
: QNode(*new QAbstractAttributePrivate(), parent)
{
@@ -87,11 +156,17 @@ QAbstractAttribute::QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint
d->m_byteStride = stride;
}
+/*!
+ * \internal
+ */
QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QNode *parent)
: QNode(dd, parent)
{
}
+/*!
+ * \internal
+ */
QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QAbstractBuffer *buf, const QString &name, DataType dataType, uint dataSize, uint count, uint offset, uint stride, QNode *parent)
: QNode(dd, parent)
{
@@ -105,6 +180,9 @@ QAbstractAttribute::QAbstractAttribute(QAbstractAttributePrivate &dd, QAbstractB
d->m_byteStride = stride;
}
+/*!
+ * \internal
+ */
void QAbstractAttribute::copy(const QNode *ref)
{
QNode::copy(ref);
@@ -120,54 +198,99 @@ void QAbstractAttribute::copy(const QNode *ref)
d_func()->m_attributeType = attribute->d_func()->m_attributeType;
}
+/*!
+ * \property QAbstractAttribute::buffer
+ *
+ * Holds the buffer.
+ */
QAbstractBuffer *QAbstractAttribute::buffer() const
{
Q_D(const QAbstractAttribute);
return d->m_buffer;
}
+/*!
+ * \property QAbstractAttribute::name
+ *
+ * Holds the name.
+ */
QString QAbstractAttribute::name() const
{
Q_D(const QAbstractAttribute);
return d->m_name;
}
+/*!
+ * \property QAbstractAttribute::dataSize
+ *
+ * Holds the data size.
+ */
uint QAbstractAttribute::dataSize() const
{
Q_D(const QAbstractAttribute);
return d->m_dataSize;
}
+/*!
+ * \property QAbstractAttribute::dataType
+ *
+ * Holds the data type.
+ */
QAbstractAttribute::DataType QAbstractAttribute::dataType() const
{
Q_D(const QAbstractAttribute);
return d->m_dataType;
}
+/*!
+ * \property QAbstractAttribute::count
+ *
+ * Holds the count.
+ */
uint QAbstractAttribute::count() const
{
Q_D(const QAbstractAttribute);
return d->m_count;
}
+/*!
+ * \property QAbstractAttribute::byteStride
+ *
+ * Holds the byte stride.
+ */
uint QAbstractAttribute::byteStride() const
{
Q_D(const QAbstractAttribute);
return d->m_byteStride;
}
+/*!
+ * \property QAbstractAttribute::byteOffset
+ *
+ * Holds the byte offset.
+ */
uint QAbstractAttribute::byteOffset() const
{
Q_D(const QAbstractAttribute);
return d->m_byteOffset;
}
+/*!
+ * \property QAbstractAttribute::divisor
+ *
+ * Holds the divisor.
+ */
uint QAbstractAttribute::divisor() const
{
Q_D(const QAbstractAttribute);
return d->m_divisor;
}
+/*!
+ * \property QAbstractAttribute::attributeType
+ *
+ * Holds the attribute type.
+ */
QAbstractAttribute::AttributeType QAbstractAttribute::attributeType() const
{
Q_D(const QAbstractAttribute);
diff --git a/src/render/geometry/qabstractbuffer.cpp b/src/render/geometry/qabstractbuffer.cpp
index 7f7c11654..7cabeee56 100644
--- a/src/render/geometry/qabstractbuffer.cpp
+++ b/src/render/geometry/qabstractbuffer.cpp
@@ -44,32 +44,61 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DCore::QAbstractBufferPrivate
- \internal
-*/
QAbstractBufferPrivate::QAbstractBufferPrivate()
: QNodePrivate()
{
}
+/*!
+ * \qmltype AbstractBuffer
+ * \instantiates Qt3DRender::QAbstractBuffer
+ * \inqmlmodule Qt3D.Render
+ * \brief Uncreatable
+ */
+
+/*!
+ * \class Qt3DRender::QAbstractBuffer
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DCore::QNode
+ *
+ * Abstract class.
+ */
+
+/*!
+ * \fn void Qt3DRender::QAbstractBuffer::dataChanged(const QByteArray &bytes)
+ *
+ * This signal is emitted with \a bytes when data changes.
+ */
+
+/*!
+ * Constructs a new QAbstractBuffer with \a parent.
+ */
QAbstractBuffer::QAbstractBuffer(QNode *parent)
: QNode(*new QAbstractBufferPrivate(), parent)
{
}
+/*!
+ * Destroys the abstract buffer.
+ */
QAbstractBuffer::~QAbstractBuffer()
{
Q_ASSERT_X(Qt3DCore::QNodePrivate::get(this)->m_wasCleanedUp, Q_FUNC_INFO, "QNode::cleanup should have been called by now. A Qt3DRender::QAbstractBuffer subclass didn't call QNode::cleanup in its destructor");
}
-/*! \internal */
+/*!
+ * \internal
+ */
QAbstractBuffer::QAbstractBuffer(QAbstractBufferPrivate &dd, QNode *parent)
: QNode(dd, parent)
{
}
+/*!
+ * \internal
+ */
void QAbstractBuffer::copy(const QNode *ref)
{
QNode::copy(ref);
@@ -77,6 +106,9 @@ void QAbstractBuffer::copy(const QNode *ref)
d_func()->m_data = buffer->d_func()->m_data;
}
+/*!
+ * Sets \a bytes as data.
+ */
void QAbstractBuffer::setData(const QByteArray &bytes)
{
Q_D(QAbstractBuffer);
@@ -87,6 +119,9 @@ void QAbstractBuffer::setData(const QByteArray &bytes)
}
}
+/*!
+ * \return the data.
+ */
QByteArray QAbstractBuffer::data() const
{
Q_D(const QAbstractBuffer);
diff --git a/src/render/geometry/qboundingvolumespecifier.cpp b/src/render/geometry/qboundingvolumespecifier.cpp
index 4d60e2981..cb62b379e 100644
--- a/src/render/geometry/qboundingvolumespecifier.cpp
+++ b/src/render/geometry/qboundingvolumespecifier.cpp
@@ -56,11 +56,39 @@ public:
QAbstractAttribute *m_positionAttribute;
};
+/*!
+ * \qmltype BoundingVolumeSpecifier
+ * \instantiates Qt3DRender::QBoundingVolumeSpecifier
+ * \inqmlmodule Qt3D.Render
+ * \brief Uncreatable
+ */
+
+/*!
+ * \qmlproperty AbstractAttribute BoundingVolumeSpecifier::positionAttribute
+ *
+ * Holds the position attribute.
+ */
+
+/*!
+ * \class Qt3DRender::QBoundingVolumeSpecifier
+ * \inmodule Qt3DRender
+ *
+ * \inherits QObject
+ */
+
+/*!
+ * Constructs a new QBoundingVolumeSpecifier with \a parent.
+ */
QBoundingVolumeSpecifier::QBoundingVolumeSpecifier(QObject *parent)
: QObject(*new QBoundingVolumeSpecifierPrivate(), parent)
{
}
+/*!
+ * \property QBoundingVolumeSpecifier::positionAttribute
+ *
+ * Holds the position attribute.
+ */
QAbstractAttribute *QBoundingVolumeSpecifier::positionAttribute() const
{
Q_D(const QBoundingVolumeSpecifier);
diff --git a/src/render/geometry/qbuffer.cpp b/src/render/geometry/qbuffer.cpp
index a582c1f32..965af0994 100644
--- a/src/render/geometry/qbuffer.cpp
+++ b/src/render/geometry/qbuffer.cpp
@@ -48,10 +48,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QBufferPrivate
- \internal
-*/
QBufferPrivate::QBufferPrivate()
: QAbstractBufferPrivate()
, m_usage(QBuffer::StaticDraw)
@@ -59,7 +55,90 @@ QBufferPrivate::QBufferPrivate()
{
}
+/*!
+ * \qmltype Buffer
+ * \instantiates Qt3DRender::QBuffer
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty QBuffer::UsageType Buffer::usage
+ *
+ * Holds the buffer usage.
+ */
+
+/*!
+ * \qmlproperty QBuffer::BufferType Buffer::type
+ *
+ * Holds the buffer type.
+ */
+
+/*!
+ * \qmlproperty bool Buffer::sync
+ *
+ * Holds the sync flag. When sync is true, this will force data created
+ * by a Qt3DRender::QBufferFunctor to also be updated on the frontend
+ * Qt3DRender::QBuffer node. By default sync is false.
+ *
+ * \note: This has no effect if the buffer's data was set directly using the data
+ * property.
+ */
+/*!
+ * \class Qt3DRender::QBuffer
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QAbstractBuffer
+ */
+
+/*!
+ * \enum QBuffer::BufferType
+ *
+ * The type of the buffer.
+ *
+ * \value VertexBuffer
+ * GL_ARRAY_BUFFER
+ * \value IndexBuffer
+ * GL_ELEMENT_ARRAY_BUFFER
+ * \value PixelPackBuffer
+ * GL_PIXEL_PACK_BUFFER
+ * \value PixelUnpackBuffer
+ * GL_PIXEL_UNPACK_BUFFER
+ */
+
+/*!
+ * \enum QBuffer::UsageType
+ *
+ * The type of the usage.
+ *
+ * \value StreamDraw
+ * GL_STREAM_DRAW
+ * \value StreamRead
+ * GL_STREAM_READ
+ * \value StreamCopy
+ * GL_STREAM_COPY
+ * \value StaticDraw
+ * GL_STATIC_DRAW
+ * \value StaticRead
+ * GL_STATIC_READ
+ * \value StaticCopy
+ * GL_STATIC_COPY
+ * \value DynamicDraw
+ * GL_DYNAMIC_DRAW
+ * \value DynamicRead
+ * GL_DYNAMIC_READ
+ * \value DynamicCopy
+ * GL_DYNAMIC_COPY
+ */
+
+/*!
+ * \typedef Qt3DRender::QBufferFunctorPtr
+ * \relates QBuffer
+ */
+
+/*!
+ * Constructs a new QBuffer of buffer type \a ty with \a parent.
+ */
QBuffer::QBuffer(QBuffer::BufferType ty, QNode *parent)
: QAbstractBuffer(*new QBufferPrivate(), parent)
{
@@ -67,12 +146,17 @@ QBuffer::QBuffer(QBuffer::BufferType ty, QNode *parent)
d->m_type = ty;
}
+/*!
+ * Destroys this buffer.
+ */
QBuffer::~QBuffer()
{
QAbstractBuffer::cleanup();
}
-/*! \internal */
+/*!
+ * \internal
+ */
QBuffer::QBuffer(QBufferPrivate &dd, QBuffer::BufferType ty, QNode *parent)
: QAbstractBuffer(dd, parent)
{
@@ -80,6 +164,9 @@ QBuffer::QBuffer(QBufferPrivate &dd, QBuffer::BufferType ty, QNode *parent)
d->m_type = ty;
}
+/*!
+ * \internal
+ */
void QBuffer::copy(const QNode *ref)
{
QAbstractBuffer::copy(ref);
@@ -90,6 +177,9 @@ void QBuffer::copy(const QNode *ref)
d_func()->m_sync = buffer->d_func()->m_sync;
}
+/*!
+ * \internal
+ */
void QBuffer::sceneChangeEvent(const QSceneChangePtr &change)
{
QScenePropertyChangePtr e = qSharedPointerCast<QScenePropertyChange>(change);
@@ -100,6 +190,11 @@ void QBuffer::sceneChangeEvent(const QSceneChangePtr &change)
}
}
+/*!
+ * \property QBuffer::usage
+ *
+ * Holds the buffer usage.
+ */
QBuffer::UsageType QBuffer::usage() const
{
Q_D(const QBuffer);
@@ -115,12 +210,20 @@ void QBuffer::setUsage(QBuffer::UsageType usage)
}
}
+/*!
+ * \property QBuffer::type
+ *
+ * Holds the buffer type.
+ */
QBuffer::BufferType QBuffer::type() const
{
Q_D(const QBuffer);
return d->m_type;
}
+/*!
+ * Sets the buffer \a functor.
+ */
void QBuffer::setBufferFunctor(const QBufferFunctorPtr &functor)
{
Q_D(QBuffer);
@@ -135,6 +238,9 @@ void QBuffer::setBufferFunctor(const QBufferFunctorPtr &functor)
}
}
+/*!
+ * \return the buffer functor.
+ */
QBufferFunctorPtr QBuffer::bufferFunctor() const
{
Q_D(const QBuffer);
@@ -142,12 +248,14 @@ QBufferFunctorPtr QBuffer::bufferFunctor() const
}
/*!
- Sets the sync to \a sync. When sync is true, this will force data created
- by a Qt3DRender::QBufferFunctor to also be updated on the frontend
- Qt3DRender::QBuffer node. By default sync is false.
-
- \note: This has no effect if the buffer's data was set directly using the data
- property.
+ * \property QBuffer::sync
+ *
+ * Holds the sync flag. When sync is true, this will force data created
+ * by a Qt3DRender::QBufferFunctor to also be updated on the frontend
+ * Qt3DRender::QBuffer node. By default sync is false.
+ *
+ * \note: This has no effect if the buffer's data was set directly using the data
+ * property.
*/
void QBuffer::setSync(bool sync)
{
@@ -158,10 +266,6 @@ void QBuffer::setSync(bool sync)
}
}
-/*!
- Returns whether data loaded by a Qt3DRender::QBufferFunctor should be
- synched with the Qt3DRender::QBuffer node or not.
- */
bool QBuffer::isSync() const
{
Q_D(const QBuffer);
diff --git a/src/render/geometry/qcuboidgeometry.cpp b/src/render/geometry/qcuboidgeometry.cpp
index 6d38186b5..64c6f5b24 100644
--- a/src/render/geometry/qcuboidgeometry.cpp
+++ b/src/render/geometry/qcuboidgeometry.cpp
@@ -492,6 +492,89 @@ void QCuboidGeometryPrivate::init()
q->addAttribute(m_indexAttribute);
}
+/*!
+ * \qmltype CuboidGeometry
+ * \instantiates Qt3DRender::QCuboidGeometry
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty float CuboidGeometry::xExtent
+ *
+ * Holds the x extent.
+ */
+
+/*!
+ * \qmlproperty float CuboidGeometry::yExtent
+ *
+ * Holds the y extent.
+ */
+
+/*!
+ * \qmlproperty float CuboidGeometry::zExtent
+ *
+ * Holds the z extent.
+ */
+
+/*!
+ * \qmlproperty size CuboidGeometry::yzMeshResolution
+ *
+ * Holds the y-z resolution.
+ */
+
+/*!
+ * \qmlproperty size CuboidGeometry::xzMeshResolution
+ *
+ * Holds the x-z resolution.
+ */
+
+/*!
+ * \qmlproperty size CuboidGeometry::xyMeshResolution
+ *
+ * Holds the x-y resolution.
+ */
+
+/*!
+ * \qmlproperty Attribute CuboidGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute CuboidGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute CuboidGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute CuboidGeometry::tangentAttribute
+ *
+ * Holds the geometry tangent attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute CuboidGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
+
+/*!
+ * \class Qt3DRender::QCuboidGeometry
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometry
+ *
+ */
+
+/*!
+ * Constructs a new QCuboidGeometry with \a parent.
+ */
QCuboidGeometry::QCuboidGeometry(QNode *parent)
: QGeometry(*new QCuboidGeometryPrivate(), parent)
{
@@ -499,6 +582,9 @@ QCuboidGeometry::QCuboidGeometry(QNode *parent)
d->init();
}
+/*!
+ * \internal
+ */
QCuboidGeometry::QCuboidGeometry(QCuboidGeometryPrivate &dd, QNode *parent)
: QGeometry(dd, parent)
{
@@ -506,11 +592,17 @@ QCuboidGeometry::QCuboidGeometry(QCuboidGeometryPrivate &dd, QNode *parent)
d->init();
}
+/*!
+ * Destroys this geometry.
+ */
QCuboidGeometry::~QCuboidGeometry()
{
QGeometry::cleanup();
}
+/*!
+ * Updates indices based on mesh resolutions.
+ */
void QCuboidGeometry::updateIndices()
{
Q_D(QCuboidGeometry);
@@ -524,6 +616,9 @@ void QCuboidGeometry::updateIndices()
}
+/*!
+ * Updates vertices based on mesh resolutions.
+ */
void QCuboidGeometry::updateVertices()
{
Q_D(QCuboidGeometry);
@@ -604,66 +699,121 @@ void QCuboidGeometry::setXYMeshResolution(const QSize &resolution)
}
}
+/*!
+ * \property QCuboidGeometry::xExtent
+ *
+ * Holds the x extent.
+ */
float QCuboidGeometry::xExtent() const
{
Q_D(const QCuboidGeometry);
return d->m_xExtent;
}
+/*!
+ * \property QCuboidGeometry::yExtent
+ *
+ * Holds the y extent.
+ */
float QCuboidGeometry::yExtent() const
{
Q_D(const QCuboidGeometry);
return d->m_yExtent;
}
+/*!
+ * \property QCuboidGeometry::zExtent
+ *
+ * Holds the z extent.
+ */
float QCuboidGeometry::zExtent() const
{
Q_D(const QCuboidGeometry);
return d->m_zExtent;
}
+/*!
+ * \property QCuboidGeometry::yzMeshResolution
+ *
+ * Holds the y-z resolution.
+ */
QSize QCuboidGeometry::yzMeshResolution() const
{
Q_D(const QCuboidGeometry);
return d->m_yzFaceResolution;
}
+/*!
+ * \property QCuboidGeometry::xzMeshResolution
+ *
+ * Holds the x-z resolution.
+ */
QSize QCuboidGeometry::xyMeshResolution() const
{
Q_D(const QCuboidGeometry);
return d->m_xyFaceResolution;
}
+/*!
+ * \property QCuboidGeometry::xyMeshResolution
+ *
+ * Holds the x-y resolution.
+ */
QSize QCuboidGeometry::xzMeshResolution() const
{
Q_D(const QCuboidGeometry);
return d->m_xzFaceResolution;
}
+/*!
+ * \property QCuboidGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
QAttribute *QCuboidGeometry::positionAttribute() const
{
Q_D(const QCuboidGeometry);
return d->m_positionAttribute;
}
+/*!
+ * \property QCuboidGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
QAttribute *QCuboidGeometry::normalAttribute() const
{
Q_D(const QCuboidGeometry);
return d->m_normalAttribute;
}
+/*!
+ * \property QCuboidGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
QAttribute *QCuboidGeometry::texCoordAttribute() const
{
Q_D(const QCuboidGeometry);
return d->m_texCoordAttribute;
}
+/*!
+ * \property QCuboidGeometry::tangentAttribute
+ *
+ * Holds the geometry tangent attribute.
+ */
QAttribute *QCuboidGeometry::tangentAttribute() const
{
Q_D(const QCuboidGeometry);
return d->m_tangentAttribute;
}
+/*!
+ * \property QCuboidGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
QAttribute *QCuboidGeometry::indexAttribute() const
{
Q_D(const QCuboidGeometry);
diff --git a/src/render/geometry/qcuboidmesh.cpp b/src/render/geometry/qcuboidmesh.cpp
index 692fbff12..bcde6efe9 100644
--- a/src/render/geometry/qcuboidmesh.cpp
+++ b/src/render/geometry/qcuboidmesh.cpp
@@ -44,6 +44,61 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+/*!
+ * \qmltype QCuboidMesh
+ * \instantiates Qt3DRender::QCuboidMesh
+ * \inqmlmodule Qt3D.Render
+ * \brief A cube mesh.
+ */
+
+/*!
+ * \qmlproperty float CuboidMesh::xExtent
+ *
+ * Holds the x extent.
+ */
+
+/*!
+ * \qmlproperty float CuboidMesh::yExtent
+ *
+ * Holds the y extent.
+ */
+
+/*!
+ * \qmlproperty float CuboidMesh::zExtent
+ *
+ * Holds the z extent.
+ */
+
+/*!
+ * \qmlproperty size CuboidMesh::yzMeshResolution
+ *
+ * Holds the y-z resolution.
+ */
+
+/*!
+ * \qmlproperty size CuboidMesh::xzMeshResolution
+ *
+ * Holds the x-z resolution.
+ */
+
+/*!
+ * \qmlproperty size CuboidMesh::xyMeshResolution
+ *
+ * Holds the x-y resolution.
+ */
+
+/*!
+ * \class Qt3DRender::QCuboidMesh
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometryRenderer
+ *
+ * \brief A cube mesh.
+ */
+
+/*!
+ * Constructs a new QCuboidMedh with \a parent.
+ */
QCuboidMesh::QCuboidMesh(QNode *parent)
: QGeometryRenderer(parent)
{
@@ -57,6 +112,9 @@ QCuboidMesh::QCuboidMesh(QNode *parent)
QGeometryRenderer::setGeometry(geometry);
}
+/*!
+ * Destroys this cube mesh.
+ */
QCuboidMesh::~QCuboidMesh()
{
QNode::cleanup();
@@ -67,6 +125,11 @@ void QCuboidMesh::setXExtent(float xExtent)
static_cast<QCuboidGeometry *>(geometry())->setXExtent(xExtent);
}
+/*!
+ * \property QCuboidMesh::xExtent
+ *
+ * Holds the x extent.
+ */
float QCuboidMesh::xExtent() const
{
return static_cast<QCuboidGeometry *>(geometry())->xExtent();
@@ -77,6 +140,11 @@ void QCuboidMesh::setYExtent(float yExtent)
static_cast<QCuboidGeometry *>(geometry())->setYExtent(yExtent);
}
+/*!
+ * \property QCuboidMesh::yExtent
+ *
+ * Holds the y extent.
+ */
float QCuboidMesh::yExtent() const
{
return static_cast<QCuboidGeometry *>(geometry())->yExtent();
@@ -87,6 +155,11 @@ void QCuboidMesh::setZExtent(float zExtent)
static_cast<QCuboidGeometry *>(geometry())->setZExtent(zExtent);
}
+/*!
+ * \property QCuboidMesh::zExtent
+ *
+ * Holds the z extent.
+ */
float QCuboidMesh::zExtent() const
{
return static_cast<QCuboidGeometry *>(geometry())->zExtent();
@@ -97,6 +170,11 @@ void QCuboidMesh::setYZMeshResolution(const QSize &resolution)
static_cast<QCuboidGeometry *>(geometry())->setYZMeshResolution(resolution);
}
+/*!
+ * \property QCuboidMesh::yzMeshResolution
+ *
+ * Holds the y-z resolution.
+ */
QSize QCuboidMesh::yzMeshResolution() const
{
return static_cast<QCuboidGeometry *>(geometry())->yzMeshResolution();
@@ -107,6 +185,11 @@ void QCuboidMesh::setXZMeshResolution(const QSize &resolution)
static_cast<QCuboidGeometry *>(geometry())->setXZMeshResolution(resolution);
}
+/*!
+ * \property QCuboidMesh::xzMeshResolution
+ *
+ * Holds the x-z resolution.
+ */
QSize QCuboidMesh::xzMeshResolution() const
{
return static_cast<QCuboidGeometry *>(geometry())->xzMeshResolution();
@@ -117,6 +200,11 @@ void QCuboidMesh::setXYMeshResolution(const QSize &resolution)
static_cast<QCuboidGeometry *>(geometry())->setXYMeshResolution(resolution);
}
+/*!
+ * \property QCuboidMesh::xyMeshResolution
+ *
+ * Holds the x-y resolution.
+ */
QSize QCuboidMesh::xyMeshResolution() const
{
return static_cast<QCuboidGeometry *>(geometry())->xyMeshResolution();
diff --git a/src/render/geometry/qcylindergeometry.cpp b/src/render/geometry/qcylindergeometry.cpp
index 83321dbe4..4e8986863 100644
--- a/src/render/geometry/qcylindergeometry.cpp
+++ b/src/render/geometry/qcylindergeometry.cpp
@@ -345,6 +345,70 @@ void QCylinderGeometryPrivate::init()
q->addAttribute(m_indexAttribute);
}
+/*!
+ * \qmltype CylinderGeometry
+ * \instantiates Qt3DRender::QCylinderGeometry
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty int CylinderGeometry::rings
+ *
+ * Holds the number of rings in the cylinder.
+ */
+
+/*!
+ * \qmlproperty int CylinderGeometry::slices
+ *
+ * Holds the number of slices in the cylinder.
+ */
+
+/*!
+ * \qmlproperty float CylinderGeometry::radius
+ *
+ * Holds the radius of the cylinder.
+ */
+
+/*!
+ * \qmlproperty float CylinderGeometry::length
+ *
+ * Holds the length of the cylinder.
+ */
+
+/*!
+ * \qmlproperty Attribute CylinderGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute CylinderGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute CylinderGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute CylinderGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
+
+/*!
+ * \class Qt3DRender::QCylinderGeometry
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometry
+ */
+
+/*!
+ * Constructs a new QCylinderMesh with \a parent.
+ */
QCylinderGeometry::QCylinderGeometry(QNode *parent)
: QGeometry(*new QCylinderGeometryPrivate, parent)
{
@@ -352,6 +416,9 @@ QCylinderGeometry::QCylinderGeometry(QNode *parent)
d->init();
}
+/*!
+ * \internal
+ */
QCylinderGeometry::QCylinderGeometry(QCylinderGeometryPrivate &dd, QNode *parent)
:QGeometry(dd, parent)
{
@@ -359,11 +426,17 @@ QCylinderGeometry::QCylinderGeometry(QCylinderGeometryPrivate &dd, QNode *parent
d->init();
}
+/*!
+ * Destroys the geometry.
+ */
QCylinderGeometry::~QCylinderGeometry()
{
QGeometry::cleanup();
}
+/*!
+ * Updates the vertices based on rings and slices.
+ */
void QCylinderGeometry::updateVertices()
{
Q_D(QCylinderGeometry);
@@ -375,6 +448,9 @@ void QCylinderGeometry::updateVertices()
d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new CylinderVertexDataFunctor(d->m_rings, d->m_slices, d->m_radius, d->m_length)));
}
+/*!
+ * Updates the indices based on rings and slices.
+ */
void QCylinderGeometry::updateIndices()
{
Q_D(QCylinderGeometry);
@@ -426,48 +502,88 @@ void QCylinderGeometry::setLength(float length)
}
}
+/*!
+ * \property QCylinderGeometry::rings
+ *
+ * Holds the number of rings in the cylinder.
+ */
int QCylinderGeometry::rings() const
{
Q_D(const QCylinderGeometry);
return d->m_rings;
}
+/*!
+ * \property QCylinderGeometry::slices
+ *
+ * Holds the number of slices in the cylinder.
+ */
int QCylinderGeometry::slices() const
{
Q_D(const QCylinderGeometry);
return d->m_slices;
}
+/*!
+ * \property QCylinderGeometry::radius
+ *
+ * Holds the radius of the cylinder.
+ */
float QCylinderGeometry::radius() const
{
Q_D(const QCylinderGeometry);
return d->m_radius;
}
+/*!
+ * \property QCylinderGeometry::length
+ *
+ * Holds the length of the cylinder.
+ */
float QCylinderGeometry::length() const
{
Q_D(const QCylinderGeometry);
return d->m_length;
}
+/*!
+ * \property QCylinderGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
QAttribute *QCylinderGeometry::positionAttribute() const
{
Q_D(const QCylinderGeometry);
return d->m_positionAttribute;
}
+/*!
+ * \property QCylinderGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
QAttribute *QCylinderGeometry::normalAttribute() const
{
Q_D(const QCylinderGeometry);
return d->m_normalAttribute;
}
+/*!
+ * \property QCylinderGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
QAttribute *QCylinderGeometry::texCoordAttribute() const
{
Q_D(const QCylinderGeometry);
return d->m_texCoordAttribute;
}
+/*!
+ * \property QCylinderGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
QAttribute *QCylinderGeometry::indexAttribute() const
{
Q_D(const QCylinderGeometry);
diff --git a/src/render/geometry/qcylindermesh.cpp b/src/render/geometry/qcylindermesh.cpp
index 97d728871..0bd528c9a 100644
--- a/src/render/geometry/qcylindermesh.cpp
+++ b/src/render/geometry/qcylindermesh.cpp
@@ -54,6 +54,49 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+/*!
+ * \qmltype CylinderMesh
+ * \instantiates Qt3DRender::QCylinderMesh
+ * \inqmlmodule Qt3D.Render
+ * \brief A cylindrical mesh.
+ */
+
+/*!
+ * \qmlproperty int CylinderMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
+
+/*!
+ * \qmlproperty int CylinderMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
+
+/*!
+ * \qmlproperty float CylinderMesh::radius
+ *
+ * Holds the radius of the cylinder.
+ */
+
+/*!
+ * \qmlproperty float CylinderMesh::length
+ *
+ * Holds the length of the cylinder.
+ */
+
+/*!
+ * \class Qt3DRender::QCylinderMesh
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometryRenderer
+ *
+ * \brief A cylindrical mesh.
+ */
+
+/*!
+ * Constructs a new QCylinderMesh with \a parent.
+ */
QCylinderMesh::QCylinderMesh(QNode *parent)
: QGeometryRenderer(parent)
{
@@ -66,6 +109,9 @@ QCylinderMesh::QCylinderMesh(QNode *parent)
QGeometryRenderer::setGeometry(geometry);
}
+/*!
+ * Destroys this cylinder mesh.
+ */
QCylinderMesh::~QCylinderMesh()
{
QNode::cleanup();
@@ -91,21 +137,41 @@ void QCylinderMesh::setLength(float length)
static_cast<QCylinderGeometry *>(geometry())->setLength(length);
}
+/*!
+ * \property QCylinderMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
int QCylinderMesh::rings() const
{
return static_cast<QCylinderGeometry *>(geometry())->rings();
}
+/*!
+ * \property QCylinderMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
int QCylinderMesh::slices() const
{
return static_cast<QCylinderGeometry *>(geometry())->slices();
}
+/*!
+ * \property QCylinderMesh::radius
+ *
+ * Holds the radius of the cylinder.
+ */
float QCylinderMesh::radius() const
{
return static_cast<QCylinderGeometry *>(geometry())->radius();
}
+/*!
+ * \property QCylinderMesh::length
+ *
+ * Holds the length of the cylinder.
+ */
float QCylinderMesh::length() const
{
return static_cast<QCylinderGeometry *>(geometry())->length();
diff --git a/src/render/geometry/qgeometry.cpp b/src/render/geometry/qgeometry.cpp
index b9e585f06..afce50db6 100644
--- a/src/render/geometry/qgeometry.cpp
+++ b/src/render/geometry/qgeometry.cpp
@@ -50,6 +50,9 @@ using namespace Qt3DCore;
namespace Qt3DRender {
+/*!
+ * \internal
+ */
void QGeometryPrivate::_q_boundingVolumeSpecifierChanged(QAbstractAttribute *)
{
if (m_changeArbiter != Q_NULLPTR) {
@@ -63,6 +66,42 @@ void QGeometryPrivate::_q_boundingVolumeSpecifierChanged(QAbstractAttribute *)
}
}
+/*!
+ * \qmltype Geometry
+ * \instantiates Qt3DRender::QGeometry
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty int Geometry::verticesPerPatch
+ *
+ * Holds vertices per patch.
+ */
+
+/*!
+ * \qmlproperty BoundingVolumeSpecifier Geometry::boundingVolumeSpecifier
+ *
+ * Holds bounding volume specifier.
+ */
+
+/*!
+ * \class Qt3DRender::QGeometry
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DCore::QNode
+ *
+ */
+
+/*!
+ * \typedef Qt3DRender::QAttributeList
+ * \relates Qt3DRender::QGeometry
+ *
+ * A vector of {QAbstractAttribute}s.
+ */
+
+/*!
+ * Constructs a new QGeometry with \a parent.
+ */
QGeometry::QGeometry(QNode *parent)
: QNode(*new QGeometryPrivate(), parent)
{
@@ -71,6 +110,9 @@ QGeometry::QGeometry(QNode *parent)
this, SLOT(_q_boundingVolumeSpecifierChanged(QAbstractAttribute *)));
}
+/*!
+ * \internal
+ */
QGeometry::QGeometry(QGeometryPrivate &dd, QNode *parent)
: QNode(dd, parent)
{
@@ -79,11 +121,17 @@ QGeometry::QGeometry(QGeometryPrivate &dd, QNode *parent)
this, SLOT(_q_boundingVolumeSpecifierChanged(QAbstractAttribute *)));
}
+/*!
+ * Destroys this geometry.
+ */
QGeometry::~QGeometry()
{
QNode::cleanup();
}
+/*!
+ * Adds an \a attribute to this geometry.
+ */
void QGeometry::addAttribute(QAbstractAttribute *attribute)
{
Q_D(QGeometry);
@@ -106,6 +154,9 @@ void QGeometry::addAttribute(QAbstractAttribute *attribute)
}
}
+/*!
+ * Removes the given \a attribute from this geometry.
+ */
void QGeometry::removeAttribute(QAbstractAttribute *attribute)
{
Q_D(QGeometry);
@@ -127,24 +178,40 @@ void QGeometry::setVerticesPerPatch(int verticesPerPatch)
}
}
+/*!
+ * \property QGeometry::verticesPerPatch
+ *
+ * Holds vertices per patch.
+ */
int QGeometry::verticesPerPatch() const
{
Q_D(const QGeometry);
return d->m_verticesPerPatch;
}
+/*!
+ * \property QGeometry::boundingVolumeSpecifier
+ *
+ * Holds bounding volume specifier.
+ */
QBoundingVolumeSpecifier *QGeometry::boundingVolumeSpecifier()
{
Q_D(QGeometry);
return &d->m_boundingVolumeSpecifier;
}
+/*!
+ * \return the list of attributes in this geometry.
+ */
QAttributeList QGeometry::attributes() const
{
Q_D(const QGeometry);
return d->m_attributes;
}
+/*!
+ * \internal
+ */
void QGeometry::copy(const QNode *ref)
{
QNode::copy(ref);
diff --git a/src/render/geometry/qgeometryrenderer.cpp b/src/render/geometry/qgeometryrenderer.cpp
index ac8b8119a..413bc37eb 100644
--- a/src/render/geometry/qgeometryrenderer.cpp
+++ b/src/render/geometry/qgeometryrenderer.cpp
@@ -62,69 +62,202 @@ QGeometryRendererPrivate::QGeometryRendererPrivate()
{
}
+/*!
+ * \qmltype GeometryRenderer
+ * \instantiates Qt3DRender::QGeometryRenderer
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty int GeometryRenderer::instanceCount
+ *
+ * Holds the instance count.
+ */
+
+/*!
+ * \qmlproperty int GeometryRenderer::primitiveCount
+ *
+ * Holds the primitive count.
+ */
+
+/*!
+ * \qmlproperty int GeometryRenderer::baseVertex
+ *
+ * Holds the base vertex.
+ */
+
+/*!
+ * \qmlproperty int GeometryRenderer::baseInstance
+ *
+ * Holds the base instance.
+ */
+
+/*!
+ * \qmlproperty int GeometryRenderer::restartIndex
+ *
+ * Holds the restart index.
+ */
+
+/*!
+ * \qmlproperty bool GeometryRenderer::primitiveRestart
+ *
+ * Holds the primitive restart flag.
+ */
+
+/*!
+ * \qmlproperty Geometry GeometryRenderer::geometry
+ *
+ * Holds the geometry.
+ */
+
+/*!
+ * \qmlproperty QGeometryRenderer::PrimitiveType GeometryRenderer::primitiveType
+ *
+ * Holds the primitive type.
+ */
+
+/*!
+ * \class Qt3DRender::QGeometryRenderer
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DCore::QComponent
+ *
+ */
+
+/*!
+ * \enum QGeometryRenderer::PrimitiveType
+ *
+ * The type of the primitive.
+ *
+ * \value Points
+ * \value Lines
+ * \value LineLoop
+ * \value LineStrip
+ * \value Triangles
+ * \value TriangleStrip
+ * \value TriangleFan
+ * \value LinesAdjacency
+ * \value TrianglesAdjacency
+ * \value LineStripAdjacency
+ * \value TriangleStripAdjacency
+ * \value Patches
+ */
+
+/*!
+ * Constructs a new QGeometryRenderer with \a parent.
+ */
QGeometryRenderer::QGeometryRenderer(QNode *parent)
: QComponent(*new QGeometryRendererPrivate(), parent)
{
}
+/*!
+ * Destroys this geometry renderer.
+ */
QGeometryRenderer::~QGeometryRenderer()
{
QComponent::cleanup();
}
+/*!
+ * \internal
+ */
QGeometryRenderer::QGeometryRenderer(QGeometryRendererPrivate &dd, QNode *parent)
: QComponent(dd, parent)
{
}
+/*!
+ * \property QGeometryRenderer::instanceCount
+ *
+ * Holds the instance count.
+ */
int QGeometryRenderer::instanceCount() const
{
Q_D(const QGeometryRenderer);
return d->m_instanceCount;
}
+/*!
+ * \property QGeometryRenderer::primitiveCount
+ *
+ * Holds the primitive count.
+ */
int QGeometryRenderer::primitiveCount() const
{
Q_D(const QGeometryRenderer);
return d->m_primitiveCount;
}
+/*!
+ * \property QGeometryRenderer::baseVertex
+ *
+ * Holds the base vertex.
+ */
int QGeometryRenderer::baseVertex() const
{
Q_D(const QGeometryRenderer);
return d->m_baseVertex;
}
+/*!
+ * \property QGeometryRenderer::baseInstance
+ *
+ * Holds the base instance.
+ */
int QGeometryRenderer::baseInstance() const
{
Q_D(const QGeometryRenderer);
return d->m_baseInstance;
}
+/*!
+ * \property QGeometryRenderer::restartIndex
+ *
+ * Holds the restart index.
+ */
int QGeometryRenderer::restartIndex() const
{
Q_D(const QGeometryRenderer);
return d->m_restartIndex;
}
+/*!
+ * \property QGeometryRenderer::primitiveRestart
+ *
+ * Holds the primitive restart flag.
+ */
bool QGeometryRenderer::primitiveRestart() const
{
Q_D(const QGeometryRenderer);
return d->m_primitiveRestart;
}
+/*!
+ * \property QGeometryRenderer::geometry
+ *
+ * Holds the geometry.
+ */
QGeometry *QGeometryRenderer::geometry() const
{
Q_D(const QGeometryRenderer);
return d->m_geometry;
}
+/*!
+ * \property QGeometryRenderer::primitiveType
+ *
+ * Holds the primitive type.
+ */
QGeometryRenderer::PrimitiveType QGeometryRenderer::primitiveType() const
{
Q_D(const QGeometryRenderer);
return d->m_primitiveType;
}
+/*!
+ * \return the geometry functor.
+ */
QGeometryFunctorPtr QGeometryRenderer::geometryFunctor() const
{
Q_D(const QGeometryRenderer);
@@ -230,6 +363,9 @@ void QGeometryRenderer::setPrimitiveType(QGeometryRenderer::PrimitiveType primit
emit primitiveTypeChanged(primitiveType);
}
+/*!
+ * Sets the geometry \a functor.
+ */
void QGeometryRenderer::setGeometryFunctor(const QGeometryFunctorPtr &functor)
{
Q_D(QGeometryRenderer);
@@ -244,6 +380,9 @@ void QGeometryRenderer::setGeometryFunctor(const QGeometryFunctorPtr &functor)
}
}
+/*!
+ * \internal
+ */
void QGeometryRenderer::copy(const QNode *ref)
{
QComponent::copy(ref);
@@ -259,6 +398,9 @@ void QGeometryRenderer::copy(const QNode *ref)
d_func()->m_functor = other->d_func()->m_functor;
}
+/*!
+ * \internal
+ */
void QGeometryRenderer::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
{
Q_D(QGeometryRenderer);
diff --git a/src/render/geometry/qmesh.cpp b/src/render/geometry/qmesh.cpp
index 4cc6af8dc..edeac6f55 100644
--- a/src/render/geometry/qmesh.cpp
+++ b/src/render/geometry/qmesh.cpp
@@ -66,20 +66,50 @@ private:
};
-/*!
- \class Qt3DRender::QMeshPrivate
- \internal
-*/
QMeshPrivate::QMeshPrivate()
: QGeometryRendererPrivate()
{
}
+/*!
+ * \qmltype Mesh
+ * \instantiates Qt3DRender::QMesh
+ * \inqmlmodule Qt3D.Render
+ * \brief A custom mesh.
+ */
+
+/*!
+ * \qmlproperty url Mesh::source
+ *
+ * Holds the source url to the file containing the custom mesh.
+ */
+
+/*!
+ * \qmlproperty string Mesh::subMesh
+ *
+ * Holds the subMesh for the mesh.
+ */
+
+/*!
+ * \class Qt3DRender::QMesh
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometryRenderer
+ *
+ * \brief A custom mesh.
+ */
+
+/*!
+ * Constructs a new QMesh with \a parent.
+ */
QMesh::QMesh(QNode *parent)
: QGeometryRenderer(*new QMeshPrivate, parent)
{
}
+/*!
+ * Destroys this mesh.
+ */
QMesh::~QMesh()
{
QNode::cleanup();
@@ -102,6 +132,11 @@ void QMesh::setSource(const QUrl& source)
emit sourceChanged(source);
}
+/*!
+ * \property QMesh::source
+ *
+ * Holds the \a source url to the file containing the custom mesh.
+ */
QUrl QMesh::source() const
{
Q_D(const QMesh);
@@ -119,12 +154,20 @@ void QMesh::setSubMesh(const QString &subMesh)
emit subMeshChanged(subMesh);
}
+/*!
+ * \property QMesh::subMesh
+ *
+ * Holds the subMesh for the mesh.
+ */
QString QMesh::subMesh() const
{
Q_D(const QMesh);
return d->m_subMesh;
}
+/*!
+ * \internal
+ */
MeshFunctor::MeshFunctor(const QUrl &sourcePath, const QString& subMesh)
: QGeometryFunctor()
, m_sourcePath(sourcePath)
@@ -132,6 +175,9 @@ MeshFunctor::MeshFunctor(const QUrl &sourcePath, const QString& subMesh)
{
}
+/*!
+ * \internal
+ */
QGeometry *MeshFunctor::operator()()
{
if (m_sourcePath.isEmpty()) {
@@ -156,6 +202,9 @@ QGeometry *MeshFunctor::operator()()
return Q_NULLPTR;
}
+/*!
+ * \internal
+ */
bool MeshFunctor::operator ==(const QGeometryFunctor &other) const
{
const MeshFunctor *otherFunctor = functor_cast<MeshFunctor>(&other);
diff --git a/src/render/geometry/qplanegeometry.cpp b/src/render/geometry/qplanegeometry.cpp
index 5d7dcfebc..8abf07a81 100644
--- a/src/render/geometry/qplanegeometry.cpp
+++ b/src/render/geometry/qplanegeometry.cpp
@@ -204,6 +204,70 @@ public:
QSize m_resolution;
};
+/*!
+ * \qmltype PlaneGeometry
+ * \instantiates Qt3DRender::QPlaneGeometry
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty float PlaneGeometry::width
+ *
+ * Holds the plane width.
+ */
+
+/*!
+ * \qmlproperty float PlaneGeometry::height
+ *
+ * Holds the plane height.
+ */
+
+/*!
+ * \qmlproperty size PlaneGeometry::resolution
+ *
+ * Holds the plane resolution.
+ */
+
+/*!
+ * \qmlproperty Attribute PlaneGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute PlaneGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute PlaneGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute PlaneGeometry::tangentAttribute
+ *
+ * Holds the geometry tangent attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute PlaneGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
+
+/*!
+ * \class Qt3DRender::QPlaneGeometry
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometry
+ */
+
+/*!
+ * Constructs a new QPlaneGeometry with \a parent.
+ */
QPlaneGeometry::QPlaneGeometry(QPlaneGeometry::QNode *parent)
: QGeometry(*new QPlaneGeometryPrivate(), parent)
{
@@ -211,6 +275,9 @@ QPlaneGeometry::QPlaneGeometry(QPlaneGeometry::QNode *parent)
d->init();
}
+/*!
+ * \internal
+ */
QPlaneGeometry::QPlaneGeometry(QPlaneGeometryPrivate &dd, QNode *parent)
: QGeometry(dd, parent)
{
@@ -218,11 +285,17 @@ QPlaneGeometry::QPlaneGeometry(QPlaneGeometryPrivate &dd, QNode *parent)
d->init();
}
+/*!
+ * Destroys this geometry.
+ */
QPlaneGeometry::~QPlaneGeometry()
{
QGeometry::cleanup();
}
+/*!
+ * Updates vertices based on resolution.
+ */
void QPlaneGeometry::updateVertices()
{
Q_D(QPlaneGeometry);
@@ -235,6 +308,9 @@ void QPlaneGeometry::updateVertices()
d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new PlaneVertexBufferFunctor(d->m_width, d->m_height, d->m_meshResolution)));
}
+/*!
+ * Updates indices based on resolution.
+ */
void QPlaneGeometry::updateIndices()
{
Q_D(QPlaneGeometry);
@@ -276,48 +352,88 @@ void QPlaneGeometry::setHeight(float height)
emit heightChanged(height);
}
+/*!
+ * \property QPlaneGeometry::resolution
+ *
+ * Holds the plane resolution.
+ */
QSize QPlaneGeometry::resolution() const
{
Q_D(const QPlaneGeometry);
return d->m_meshResolution;
}
+/*!
+ * \property QPlaneGeometry::width
+ *
+ * Holds the plane width.
+ */
float QPlaneGeometry::width() const
{
Q_D(const QPlaneGeometry);
return d->m_width;
}
+/*!
+ * \property QPlaneGeometry::height
+ *
+ * Holds the plane height.
+ */
float QPlaneGeometry::height() const
{
Q_D(const QPlaneGeometry);
return d->m_height;
}
+/*!
+ * \property QPlaneGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
QAttribute *QPlaneGeometry::positionAttribute() const
{
Q_D(const QPlaneGeometry);
return d->m_positionAttribute;
}
+/*!
+ * \property QPlaneGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
QAttribute *QPlaneGeometry::normalAttribute() const
{
Q_D(const QPlaneGeometry);
return d->m_normalAttribute;
}
+/*!
+ * \property QPlaneGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
QAttribute *QPlaneGeometry::texCoordAttribute() const
{
Q_D(const QPlaneGeometry);
return d->m_texCoordAttribute;
}
+/*!
+ * \property QPlaneGeometry::tangentAttribute
+ *
+ * Holds the geometry tangent attribute.
+ */
QAttribute *QPlaneGeometry::tangentAttribute() const
{
Q_D(const QPlaneGeometry);
return d->m_tangentAttribute;
}
+/*!
+ * \property QPlaneGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
QAttribute *QPlaneGeometry::indexAttribute() const
{
Q_D(const QPlaneGeometry);
diff --git a/src/render/geometry/qplanemesh.cpp b/src/render/geometry/qplanemesh.cpp
index 07d128f75..5efa33116 100644
--- a/src/render/geometry/qplanemesh.cpp
+++ b/src/render/geometry/qplanemesh.cpp
@@ -44,6 +44,43 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+/*!
+ * \qmltype PlaneMesh
+ * \instantiates Qt3DRender::QPlaneMesh
+ * \inqmlmodule Qt3D.Render
+ * \brief A square planar mesh.
+ */
+
+/*!
+ * \qmlproperty float PlaneMesh::width
+ *
+ * Holds the plane width.
+ */
+
+/*!
+ * \qmlproperty float PlaneMesh::height
+ *
+ * Holds the plane height.
+ */
+
+/*!
+ * \qmlproperty size PlaneMesh::meshResolution
+ *
+ * Holds the plane resolution.
+ */
+
+/*!
+ * \class Qt3DRender::QPlaneMesh
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometryRenderer
+ *
+ * \brief A square planar mesh.
+ */
+
+/*!
+ * Constructs a new QPlaneMesh with \a parent.
+ */
QPlaneMesh::QPlaneMesh(QNode *parent)
: QGeometryRenderer(parent)
{
@@ -54,6 +91,9 @@ QPlaneMesh::QPlaneMesh(QNode *parent)
QGeometryRenderer::setGeometry(geometry);
}
+/*!
+ * Destroys this plane mesh.
+ */
QPlaneMesh::~QPlaneMesh()
{
QNode::cleanup();
@@ -64,6 +104,11 @@ void QPlaneMesh::setWidth(float width)
static_cast<QPlaneGeometry *>(geometry())->setWidth(width);
}
+/*!
+ * \property QPlaneMesh::width
+ *
+ * Holds the plane width.
+ */
float QPlaneMesh::width() const
{
return static_cast<QPlaneGeometry *>(geometry())->width();
@@ -74,6 +119,11 @@ void QPlaneMesh::setHeight(float height)
static_cast<QPlaneGeometry *>(geometry())->setHeight(height);
}
+/*!
+ * \property QPlaneMesh::height
+ *
+ * Holds the plane height.
+ */
float QPlaneMesh::height() const
{
return static_cast<QPlaneGeometry *>(geometry())->height();
@@ -84,6 +134,11 @@ void QPlaneMesh::setMeshResolution(const QSize &resolution)
static_cast<QPlaneGeometry *>(geometry())->setResolution(resolution);
}
+/*!
+ * \property QPlaneMesh::meshResolution
+ *
+ * Holds the plane resolution.
+ */
QSize QPlaneMesh::meshResolution() const
{
return static_cast<QPlaneGeometry *>(geometry())->resolution();
diff --git a/src/render/geometry/qspheregeometry.cpp b/src/render/geometry/qspheregeometry.cpp
index 9a97c422e..72c5b64df 100644
--- a/src/render/geometry/qspheregeometry.cpp
+++ b/src/render/geometry/qspheregeometry.cpp
@@ -311,6 +311,76 @@ void QSphereGeometryPrivate::init()
q->addAttribute(m_indexAttribute);
}
+/*!
+ * \qmltype SphereGeometry
+ * \instantiates Qt3DRender::QSphereGeometry
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty int SphereGeometry::rings
+ *
+ * Holds the number of rings in the sphere.
+ */
+
+/*!
+ * \qmlproperty int SphereGeometry::slices
+ *
+ * Holds the number of slices in the sphere.
+ */
+
+/*!
+ * \qmlproperty float SphereGeometry::radius
+ *
+ * Holds the radius of the sphere.
+ */
+
+/*!
+ * \qmlproperty bool SphereGeometry::generateTangents
+ *
+ * Holds the value of the automatic tangent generation flag.
+ */
+
+/*!
+ * \qmlproperty Attribute SphereGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute SphereGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute SphereGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute SphereGeometry::tangentAttribute
+ *
+ * Holds the geometry tangent attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute SphereGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
+
+/*!
+ * \class Qt3DRender::QSphereGeometry
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometry
+ */
+
+/*!
+ * Constructs a new QSphereGeometry with \a parent.
+ */
QSphereGeometry::QSphereGeometry(QNode *parent)
: QGeometry(*new QSphereGeometryPrivate(), parent)
{
@@ -318,6 +388,9 @@ QSphereGeometry::QSphereGeometry(QNode *parent)
d->init();
}
+/*!
+ * \internal
+ */
QSphereGeometry::QSphereGeometry(QSphereGeometryPrivate &dd, QNode *parent)
: QGeometry(dd, parent)
{
@@ -325,11 +398,17 @@ QSphereGeometry::QSphereGeometry(QSphereGeometryPrivate &dd, QNode *parent)
d->init();
}
+/*!
+ * Destroys this geometry.
+ */
QSphereGeometry::~QSphereGeometry()
{
QGeometry::cleanup();
}
+/*!
+ * Updates vertices based on rings and slices.
+ */
void QSphereGeometry::updateVertices()
{
Q_D(QSphereGeometry);
@@ -341,6 +420,9 @@ void QSphereGeometry::updateVertices()
d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new SphereVertexDataFunctor(d->m_rings, d->m_slices, d->m_radius)));
}
+/*!
+ * Updates indices based on rings and slices.
+ */
void QSphereGeometry::updateIndices()
{
Q_D(QSphereGeometry);
@@ -395,54 +477,99 @@ void QSphereGeometry::setGenerateTangents(bool gen)
}
}
+/*!
+ * \property QSphereGeometry::generateTangents
+ *
+ * Holds the value of the automatic tangent generation flag.
+ */
bool QSphereGeometry::generateTangents() const
{
Q_D(const QSphereGeometry);
return d->m_generateTangents;
}
+/*!
+ * \property QSphereGeometry::rings
+ *
+ * Holds the number of rings in the sphere.
+ */
int QSphereGeometry::rings() const
{
Q_D(const QSphereGeometry);
return d->m_rings;
}
+/*!
+ * \property QSphereGeometry::slices
+ *
+ * Holds the number of slices in the sphere.
+ */
int QSphereGeometry::slices() const
{
Q_D(const QSphereGeometry);
return d->m_slices;
}
+/*!
+ * \property QSphereGeometry::radius
+ *
+ * Holds the radius of the sphere.
+ */
float QSphereGeometry::radius() const
{
Q_D(const QSphereGeometry);
return d->m_radius;
}
+/*!
+ * \property QSphereGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
QAttribute *QSphereGeometry::positionAttribute() const
{
Q_D(const QSphereGeometry);
return d->m_positionAttribute;
}
+/*!
+ * \property QSphereGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
QAttribute *QSphereGeometry::normalAttribute() const
{
Q_D(const QSphereGeometry);
return d->m_normalAttribute;
}
+/*!
+ * \property QSphereGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
QAttribute *QSphereGeometry::texCoordAttribute() const
{
Q_D(const QSphereGeometry);
return d->m_texCoordAttribute;
}
+/*!
+ * \property QSphereGeometry::tangentAttribute
+ *
+ * Holds the geometry tangent attribute.
+ */
QAttribute *QSphereGeometry::tangentAttribute() const
{
Q_D(const QSphereGeometry);
return d->m_tangentAttribute;
}
+/*!
+ * \property QSphereGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
QAttribute *QSphereGeometry::indexAttribute() const
{
Q_D(const QSphereGeometry);
diff --git a/src/render/geometry/qspheremesh.cpp b/src/render/geometry/qspheremesh.cpp
index d6ca6cafa..a31370eb4 100644
--- a/src/render/geometry/qspheremesh.cpp
+++ b/src/render/geometry/qspheremesh.cpp
@@ -45,6 +45,49 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+/*!
+ * \qmltype SphereMesh
+ * \instantiates Qt3DRender::QSphereMesh
+ * \inqmlmodule Qt3D.Render
+ * \brief A spherical mesh.
+ */
+
+/*!
+ * \qmlproperty int SphereMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
+
+/*!
+ * \qmlproperty int SphereMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
+
+/*!
+ * \qmlproperty float SphereMesh::radius
+ *
+ * Holds the radius of the sphere.
+ */
+
+/*!
+ * \qmlproperty bool SphereMesh::generateTangents
+ *
+ * Holds the value of the automatic tangent generation flag.
+ */
+
+/*!
+ * \class Qt3DRender::QSphereMesh
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometryRenderer
+ *
+ * \brief A spherical mesh.
+ */
+
+/*!
+ * Constructs a new QSphereMesh with \a parent.
+ */
QSphereMesh::QSphereMesh(QNode *parent)
: QGeometryRenderer(parent)
{
@@ -56,6 +99,9 @@ QSphereMesh::QSphereMesh(QNode *parent)
QGeometryRenderer::setGeometry(geometry);
}
+/*!
+ * Destroys this sphere mesh.
+ */
QSphereMesh::~QSphereMesh()
{
QNode::cleanup();
@@ -81,21 +127,41 @@ void QSphereMesh::setGenerateTangents(bool gen)
static_cast<QSphereGeometry *>(geometry())->setGenerateTangents(gen);
}
+/*!
+ * \property QSphereMesh::generateTangents
+ *
+ * Holds the value of the automatic tangent generation flag.
+ */
bool QSphereMesh::generateTangents() const
{
return static_cast<QSphereGeometry *>(geometry())->generateTangents();
}
+/*!
+ * \property QSphereMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
int QSphereMesh::rings() const
{
return static_cast<QSphereGeometry *>(geometry())->rings();
}
+/*!
+ * \property QSphereMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
int QSphereMesh::slices() const
{
return static_cast<QSphereGeometry *>(geometry())->slices();
}
+/*!
+ * \property QSphereMesh::radius
+ *
+ * Holds the radius of the sphere.
+ */
float QSphereMesh::radius() const
{
return static_cast<QSphereGeometry *>(geometry())->radius();
diff --git a/src/render/geometry/qtorusgeometry.cpp b/src/render/geometry/qtorusgeometry.cpp
index f66cd2dc8..af77e7e95 100644
--- a/src/render/geometry/qtorusgeometry.cpp
+++ b/src/render/geometry/qtorusgeometry.cpp
@@ -260,6 +260,70 @@ void QTorusGeometryPrivate::init()
q->addAttribute(m_indexAttribute);
}
+/*!
+ * \qmltype TorusGeometry
+ * \instantiates Qt3DRender::QTorusGeometry
+ * \inqmlmodule Qt3D.Render
+ */
+
+/*!
+ * \qmlproperty int TorusGeometry::rings
+ *
+ * Holds the number of rings in the torus.
+ */
+
+/*!
+ * \qmlproperty int TorusGeometry::slices
+ *
+ * Holds the number of slices in the torus.
+ */
+
+/*!
+ * \qmlproperty float TorusGeometry::radius
+ *
+ * Holds the outer radius of the torus.
+ */
+
+/*!
+ * \qmlproperty float TorusGeometry::minorRadius
+ *
+ * Holds the inner radius of the torus.
+ */
+
+/*!
+ * \qmlproperty Attribute TorusGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute TorusGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute TorusGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
+
+/*!
+ * \qmlproperty Attribute TorusGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
+
+/*!
+ * \class Qt3DRender::QTorusGeometry
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometry
+ */
+
+/*!
+ * Constructs a new QTorusGeometry with \a parent.
+ */
QTorusGeometry::QTorusGeometry(QNode *parent)
: QGeometry(*new QTorusGeometryPrivate(), parent)
{
@@ -267,6 +331,9 @@ QTorusGeometry::QTorusGeometry(QNode *parent)
d->init();
}
+/*!
+ * \internal
+ */
QTorusGeometry::QTorusGeometry(QTorusGeometryPrivate &dd, QNode *parent)
: QGeometry(dd, parent)
{
@@ -274,11 +341,17 @@ QTorusGeometry::QTorusGeometry(QTorusGeometryPrivate &dd, QNode *parent)
d->init();
}
+/*!
+ * Destroys this geometry.
+ */
QTorusGeometry::~QTorusGeometry()
{
QGeometry::cleanup();
}
+/*!
+ * Updates vertices based on rings and slices.
+ */
void QTorusGeometry::updateVertices()
{
Q_D(QTorusGeometry);
@@ -289,6 +362,9 @@ void QTorusGeometry::updateVertices()
d->m_vertexBuffer->setBufferFunctor(QBufferFunctorPtr(new TorusVertexDataFunctor(d->m_rings, d->m_slices, d->m_radius, d->m_minorRadius)));
}
+/*!
+ * Updates indices based on rings and slices.
+ */
void QTorusGeometry::updateIndices()
{
Q_D(QTorusGeometry);
@@ -340,48 +416,88 @@ void QTorusGeometry::setMinorRadius(float minorRadius)
}
}
+/*!
+ * \property QTorusGeometry::rings
+ *
+ * Holds the number of rings in the torus.
+ */
int QTorusGeometry::rings() const
{
Q_D(const QTorusGeometry);
return d->m_rings;
}
+/*!
+ * \property QTorusGeometry::slices
+ *
+ * Holds the number of slices in the torus.
+ */
int QTorusGeometry::slices() const
{
Q_D(const QTorusGeometry);
return d->m_slices;
}
+/*!
+ * \property QTorusGeometry::radius
+ *
+ * Holds the outer radius of the torus.
+ */
float QTorusGeometry::radius() const
{
Q_D(const QTorusGeometry);
return d->m_radius;
}
+/*!
+ * \property QTorusGeometry::minorRadius
+ *
+ * Holds the inner radius of the torus.
+ */
float QTorusGeometry::minorRadius() const
{
Q_D(const QTorusGeometry);
return d->m_minorRadius;
}
+/*!
+ * \property QTorusGeometry::positionAttribute
+ *
+ * Holds the geometry position attribute.
+ */
QAttribute *QTorusGeometry::positionAttribute() const
{
Q_D(const QTorusGeometry);
return d->m_positionAttribute;
}
+/*!
+ * \property QTorusGeometry::normalAttribute
+ *
+ * Holds the geometry normal attribute.
+ */
QAttribute *QTorusGeometry::normalAttribute() const
{
Q_D(const QTorusGeometry);
return d->m_normalAttribute;
}
+/*!
+ * \property QTorusGeometry::texCoordAttribute
+ *
+ * Holds the geometry texture coordinate attribute.
+ */
QAttribute *QTorusGeometry::texCoordAttribute() const
{
Q_D(const QTorusGeometry);
return d->m_texCoordAttribute;
}
+/*!
+ * \property QTorusGeometry::indexAttribute
+ *
+ * Holds the geometry index attribute.
+ */
QAttribute *QTorusGeometry::indexAttribute() const
{
Q_D(const QTorusGeometry);
diff --git a/src/render/geometry/qtorusmesh.cpp b/src/render/geometry/qtorusmesh.cpp
index 1a06494b5..4d9161f7e 100644
--- a/src/render/geometry/qtorusmesh.cpp
+++ b/src/render/geometry/qtorusmesh.cpp
@@ -49,6 +49,49 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+/*!
+ * \qmltype TorusMesh
+ * \instantiates Qt3DRender::QTorusMesh
+ * \inqmlmodule Qt3D.Render
+ * \brief A custom mesh.
+ */
+
+/*!
+ * \qmlproperty int TorusMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
+
+/*!
+ * \qmlproperty int TorusMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
+
+/*!
+ * \qmlproperty float TorusMesh::radius
+ *
+ * Holds the outer radius of the torus.
+ */
+
+/*!
+ * \qmlproperty float TorusMesh::minorRadius
+ *
+ * Holds the inner radius of the torus.
+ */
+
+/*!
+ * \class Qt3DRender::QTorusMesh
+ * \inmodule Qt3DRender
+ *
+ * \inherits Qt3DRender::QGeometryRenderer
+ *
+ * \brief A custom mesh.
+ */
+
+/*!
+ * Constructs a new QTorusMesh with \a parent.
+ */
QTorusMesh::QTorusMesh(QNode *parent)
: QGeometryRenderer(parent)
{
@@ -61,6 +104,9 @@ QTorusMesh::QTorusMesh(QNode *parent)
QGeometryRenderer::setGeometry(geometry);
}
+/*!
+ * Destroys this torus mesh.
+ */
QTorusMesh::~QTorusMesh()
{
QGeometryRenderer::cleanup();
@@ -86,21 +132,41 @@ void QTorusMesh::setMinorRadius(float minorRadius)
static_cast<QTorusGeometry *>(geometry())->setMinorRadius(minorRadius);
}
+/*!
+ * \property QTorusMesh::rings
+ *
+ * Holds the number of rings in the mesh.
+ */
int QTorusMesh::rings() const
{
return static_cast<QTorusGeometry *>(geometry())->rings();
}
+/*!
+ * \property QTorusMesh::slices
+ *
+ * Holds the number of slices in the mesh.
+ */
int QTorusMesh::slices() const
{
return static_cast<QTorusGeometry *>(geometry())->slices();
}
+/*!
+ * \property QTorusMesh::radius
+ *
+ * Holds the outer radius of the torus.
+ */
float QTorusMesh::radius() const
{
return static_cast<QTorusGeometry *>(geometry())->radius();
}
+/*!
+ * \property QTorusMesh::minorRadius
+ *
+ * Holds the inner radius of the torus.
+ */
float QTorusMesh::minorRadius() const
{
return static_cast<QTorusGeometry *>(geometry())->minorRadius();
diff --git a/src/render/io/qabstractsceneloader.cpp b/src/render/io/qabstractsceneloader.cpp
index 7f5c61e1b..213486864 100644
--- a/src/render/io/qabstractsceneloader.cpp
+++ b/src/render/io/qabstractsceneloader.cpp
@@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QAbstractSceneLoaderPrivate
- \internal
-*/
QAbstractSceneLoaderPrivate::QAbstractSceneLoaderPrivate()
: QComponentPrivate()
, m_status(QAbstractSceneLoader::Loading)
diff --git a/src/render/lights/qdirectionallight.cpp b/src/render/lights/qdirectionallight.cpp
index 22b3421dd..b85ff5ac4 100644
--- a/src/render/lights/qdirectionallight.cpp
+++ b/src/render/lights/qdirectionallight.cpp
@@ -64,10 +64,6 @@ namespace Qt3DRender {
* \endcode
*/
-/*!
- \class Qt3DRender::QDirectionalLightPrivate
- \internal
-*/
QDirectionalLightPrivate::QDirectionalLightPrivate()
: QLightPrivate(QLight::DirectionalLight)
, m_direction(0.0f, -1.0f, 0.0f)
diff --git a/src/render/lights/qlight.cpp b/src/render/lights/qlight.cpp
index edba0b4b8..cd68d843c 100644
--- a/src/render/lights/qlight.cpp
+++ b/src/render/lights/qlight.cpp
@@ -48,16 +48,12 @@ namespace Qt3DRender
/*!
* \qmltype Light
* \inqmlmodule Qt3D.Render
- * \instantiates QLight
+ * \instantiates Qt3DRender::QLight
* \brief Encapsulate a QLight object in a Qt 3D scene.
* \since 5.6
*/
-/*!
- \class Qt3DRender::QLightPrivate
- \internal
-*/
QLightPrivate::QLightPrivate(QLight::Type type)
: m_type(type)
, m_color(QColor(255, 255, 255))
diff --git a/src/render/lights/qpointlight.cpp b/src/render/lights/qpointlight.cpp
index ced3ed681..68db07ecc 100644
--- a/src/render/lights/qpointlight.cpp
+++ b/src/render/lights/qpointlight.cpp
@@ -61,10 +61,6 @@ namespace Qt3DRender {
\endcode
*/
-/*!
- \class Qt3DRender::QPointLightPrivate
- \internal
-*/
QPointLightPrivate::QPointLightPrivate(QLight::Type type)
: QLightPrivate(type)
, m_attenuation(0.0f, 0.0f, 0.002f)
diff --git a/src/render/lights/qspotlight.cpp b/src/render/lights/qspotlight.cpp
index 12778c90b..af245d2da 100644
--- a/src/render/lights/qspotlight.cpp
+++ b/src/render/lights/qspotlight.cpp
@@ -65,10 +65,6 @@ namespace Qt3DRender {
\endcode
*/
-/*!
- \class Qt3DRender::QSpotLightPrivate
- \internal
-*/
QSpotLightPrivate::QSpotLightPrivate()
: QPointLightPrivate(QLight::SpotLight)
, m_cutOffAngle(45.0f)
diff --git a/src/render/materialsystem/qannotation.cpp b/src/render/materialsystem/qannotation.cpp
index 38380ae33..e3ffd148b 100644
--- a/src/render/materialsystem/qannotation.cpp
+++ b/src/render/materialsystem/qannotation.cpp
@@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QAnnotationPrivate
- \internal
-*/
QAnnotationPrivate::QAnnotationPrivate()
: QNodePrivate()
{
diff --git a/src/render/materialsystem/qeffect.cpp b/src/render/materialsystem/qeffect.cpp
index aadb43274..fb5612896 100644
--- a/src/render/materialsystem/qeffect.cpp
+++ b/src/render/materialsystem/qeffect.cpp
@@ -50,10 +50,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QEffectPrivate
- \internal
-*/
QEffectPrivate::QEffectPrivate()
: QNodePrivate()
{
diff --git a/src/render/materialsystem/qmaterial.cpp b/src/render/materialsystem/qmaterial.cpp
index caff5e57d..be4237898 100644
--- a/src/render/materialsystem/qmaterial.cpp
+++ b/src/render/materialsystem/qmaterial.cpp
@@ -46,6 +46,13 @@
#include <Qt3DCore/qscenepropertychange.h>
/*!
+ * \qmltype Material
+ * \instantiates Qt3DRender::QMaterial
+ * \inqmlmodule Qt3D.Render
+ * \brief Non-creatable abstract base for materials.
+ */
+
+/*!
* \class Qt3DRender::QMaterial
* \inmodule Qt3DRender
*
@@ -69,10 +76,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QMaterialPrivate
- \internal
-*/
QMaterialPrivate::QMaterialPrivate()
: QComponentPrivate()
, m_effect(Q_NULLPTR)
diff --git a/src/render/materialsystem/qparameter.cpp b/src/render/materialsystem/qparameter.cpp
index c3ef446d3..c02993e34 100644
--- a/src/render/materialsystem/qparameter.cpp
+++ b/src/render/materialsystem/qparameter.cpp
@@ -49,10 +49,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QParameterPrivate
- \internal
-*/
QParameterPrivate::QParameterPrivate()
: QNodePrivate()
{
diff --git a/src/render/materialsystem/qparametermapping.cpp b/src/render/materialsystem/qparametermapping.cpp
index 63704d959..eeaa8a621 100644
--- a/src/render/materialsystem/qparametermapping.cpp
+++ b/src/render/materialsystem/qparametermapping.cpp
@@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QParameterMappingPrivate
- \internal
-*/
QParameterMappingPrivate::QParameterMappingPrivate()
: QNodePrivate()
, m_bindingType(QParameterMapping::Uniform)
@@ -96,7 +92,8 @@ QParameterMapping::QParameterMapping(QNode *parent)
\value Attribute
\value StandardUniform
\value FragmentOutput
-
+ \value UniformBufferObject
+ \value ShaderStorageBufferObject
*/
/*! \internal */
diff --git a/src/render/materialsystem/qrenderpass.cpp b/src/render/materialsystem/qrenderpass.cpp
index 9587f2955..d62adffe2 100644
--- a/src/render/materialsystem/qrenderpass.cpp
+++ b/src/render/materialsystem/qrenderpass.cpp
@@ -53,10 +53,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QRenderPassPrivate
- \internal
-*/
QRenderPassPrivate::QRenderPassPrivate()
: QNodePrivate()
, m_shader(Q_NULLPTR)
diff --git a/src/render/materialsystem/qshaderdata.cpp b/src/render/materialsystem/qshaderdata.cpp
index c788c7bfc..d9d38252d 100644
--- a/src/render/materialsystem/qshaderdata.cpp
+++ b/src/render/materialsystem/qshaderdata.cpp
@@ -44,10 +44,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QShaderDataPrivate
- \internal
-*/
QShaderDataPrivate::QShaderDataPrivate()
: QComponentPrivate()
, m_propertyReader(PropertyReaderInterfacePtr(new QShaderDataPropertyReader()))
diff --git a/src/render/materialsystem/qshaderprogram.cpp b/src/render/materialsystem/qshaderprogram.cpp
index a4afa9c04..fcb7519d8 100644
--- a/src/render/materialsystem/qshaderprogram.cpp
+++ b/src/render/materialsystem/qshaderprogram.cpp
@@ -50,10 +50,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QShaderProgramPrivate
- \internal
-*/
QShaderProgramPrivate::QShaderProgramPrivate()
: QNodePrivate()
{
diff --git a/src/render/materialsystem/qtechnique.cpp b/src/render/materialsystem/qtechnique.cpp
index ba81f3d11..9a632bd3b 100644
--- a/src/render/materialsystem/qtechnique.cpp
+++ b/src/render/materialsystem/qtechnique.cpp
@@ -50,10 +50,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QTechniquePrivate
- \internal
-*/
QTechniquePrivate::QTechniquePrivate()
: QNodePrivate()
{
diff --git a/src/render/materialsystem/shader.cpp b/src/render/materialsystem/shader.cpp
index 4fd35a327..396533da3 100644
--- a/src/render/materialsystem/shader.cpp
+++ b/src/render/materialsystem/shader.cpp
@@ -61,7 +61,6 @@ Shader::Shader()
, m_program(Q_NULLPTR)
, m_isLoaded(false)
, m_dna(0)
- , m_mutex(new QMutex())
{
m_shaderCode.resize(static_cast<int>(QShaderProgram::Compute) + 1);
}
@@ -70,7 +69,6 @@ Shader::~Shader()
{
// TO DO: ShaderProgram is leaked as of now
// Fix that taking care that they may be shared given a same dna
- delete m_mutex;
}
void Shader::cleanup()
@@ -258,7 +256,7 @@ void Shader::updateUniforms(GraphicsContext *ctx, const ShaderParameterPack &pac
void Shader::setFragOutputs(const QHash<QString, int> &fragOutputs)
{
{
- QMutexLocker lock(m_mutex);
+ QMutexLocker lock(&m_mutex);
m_fragOutputs = fragOutputs;
}
updateDNA();
@@ -334,7 +332,7 @@ void Shader::updateDNA()
+ m_shaderCode[QShaderProgram::Fragment]
+ m_shaderCode[QShaderProgram::Compute]);
- QMutexLocker locker(m_mutex);
+ QMutexLocker locker(&m_mutex);
uint attachmentHash = 0;
QHash<QString, int>::const_iterator it = m_fragOutputs.begin();
QHash<QString, int>::const_iterator end = m_fragOutputs.end();
diff --git a/src/render/materialsystem/shader_p.h b/src/render/materialsystem/shader_p.h
index 9b666aa35..88694fd98 100644
--- a/src/render/materialsystem/shader_p.h
+++ b/src/render/materialsystem/shader_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include <QMutex>
#include <QVector>
#include <Qt3DRender/private/quniformvalue_p.h>
#include <Qt3DRender/private/shadervariables_p.h>
@@ -59,7 +60,6 @@
QT_BEGIN_NAMESPACE
class QOpenGLShaderProgram;
-class QMutex;
namespace Qt3DRender {
@@ -131,7 +131,7 @@ private:
bool m_isLoaded;
ProgramDNA m_dna;
- QMutex *m_mutex;
+ QMutex m_mutex;
void updateDNA();
diff --git a/src/render/materialsystem/shaderdata.cpp b/src/render/materialsystem/shaderdata.cpp
index 2aefce7cb..2301e0984 100644
--- a/src/render/materialsystem/shaderdata.cpp
+++ b/src/render/materialsystem/shaderdata.cpp
@@ -59,14 +59,12 @@ namespace Render {
QList<Qt3DCore::QNodeId> ShaderData::m_updatedShaderData;
ShaderData::ShaderData()
- : m_mutex(new QMutex)
- , m_managers(Q_NULLPTR)
+ : m_managers(Q_NULLPTR)
{
}
ShaderData::~ShaderData()
{
- delete m_mutex;
}
void ShaderData::setManagers(NodeManagers *managers)
@@ -144,7 +142,7 @@ bool ShaderData::updateViewTransform(const QMatrix4x4 &viewMatrix)
{
// We can't perform this only once as we don't know if we would be call as the root or a
// nested ShaderData
- QMutexLocker lock(m_mutex);
+ QMutexLocker lock(&m_mutex);
// Update transformed properties
// We check the matrices and decide if the transform has changed since the previous call to needsUpdate
@@ -219,7 +217,7 @@ bool ShaderData::updateWorldTransform(const QMatrix4x4 &worldMatrix)
// Called by renderview jobs (several concurrent threads)
void ShaderData::markDirty()
{
- QMutexLocker lock(m_mutex);
+ QMutexLocker lock(&m_mutex);
if (!ShaderData::m_updatedShaderData.contains(peerUuid()))
ShaderData::m_updatedShaderData.append(peerUuid());
}
diff --git a/src/render/materialsystem/shaderdata_p.h b/src/render/materialsystem/shaderdata_p.h
index da8585d36..a77434ce8 100644
--- a/src/render/materialsystem/shaderdata_p.h
+++ b/src/render/materialsystem/shaderdata_p.h
@@ -103,7 +103,7 @@ protected:
PropertyReaderInterfacePtr m_propertyReader;
QHash<QString, QVariant> m_nestedShaderDataProperties;
QHash<QString, QShaderData::TransformType> m_transformedProperties;
- QMutex *m_mutex;
+ QMutex m_mutex;
static QList<Qt3DCore::QNodeId> m_updatedShaderData;
QMatrix4x4 m_worldMatrix;
QMatrix4x4 m_viewMatrix;
diff --git a/src/render/renderstates/qrenderstate.cpp b/src/render/renderstates/qrenderstate.cpp
index 9cb719356..52fe5c5cb 100644
--- a/src/render/renderstates/qrenderstate.cpp
+++ b/src/render/renderstates/qrenderstate.cpp
@@ -45,10 +45,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QRenderStatePrivate
- \internal
-*/
QRenderStatePrivate::QRenderStatePrivate(QRenderState::Type type)
: QNodePrivate(),
m_type(type)
diff --git a/src/render/shaders/es2/light.inc.frag100 b/src/render/shaders/es2/light.inc.frag100
index 50adedc76..b4988ad82 100644
--- a/src/render/shaders/es2/light.inc.frag100
+++ b/src/render/shaders/es2/light.inc.frag100
@@ -1,4 +1,4 @@
-const int MAX_LIGHTS = 4;
+const int MAX_LIGHTS = 2; // RPi: cannot use more than two as we run out of uniforms
const int TYPE_POINT = 0;
const int TYPE_DIRECTIONAL = 1;
const int TYPE_SPOT = 2;
@@ -87,70 +87,6 @@ void adsModelNormalMapped(const in FP vec3 vpos, const in FP vec3 vnormal, const
diffuseColor += att * lights[1].intensity * diffuse * lights[1].color;
specularColor += att * specular;
-
- // 2
- if (lightCount < 3)
- return;
- att = 1.0;
- if ( lights[2].type != TYPE_DIRECTIONAL ) {
- s = tangentMatrix * ( lights[2].position - vpos );
- if (length( lights[2].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[2].attenuation.x + lights[2].attenuation.y * dist + lights[2].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[2].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[2].direction))) ) > lights[2].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( tangentMatrix * -lights[2].direction );
- }
-
- diffuse = max( dot( s, n ), 0.0 );
-
- specular = 0.0;
- if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
- FP vec3 r = reflect( -s, n );
- FP vec3 v = normalize( tangentMatrix * ( eye - vpos ) );
- FP float normFactor = ( shininess + 2.0 ) / 2.0;
- specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
- }
-
- diffuseColor += att * lights[2].intensity * diffuse * lights[2].color;
- specularColor += att * specular;
-
- // 3
- if (lightCount < 4)
- return;
- att = 1.0;
- if ( lights[3].type != TYPE_DIRECTIONAL ) {
- s = tangentMatrix * ( lights[3].position - vpos );
- if (length( lights[3].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[3].attenuation.x + lights[3].attenuation.y * dist + lights[3].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[3].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[3].direction))) ) > lights[3].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( tangentMatrix * -lights[3].direction );
- }
-
- diffuse = max( dot( s, n ), 0.0 );
-
- specular = 0.0;
- if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
- FP vec3 r = reflect( -s, n );
- FP vec3 v = normalize( tangentMatrix * ( eye - vpos ) );
- FP float normFactor = ( shininess + 2.0 ) / 2.0;
- specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
- }
-
- diffuseColor += att * lights[3].intensity * diffuse * lights[3].color;
- specularColor += att * specular;
}
void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 eye, const in FP float shininess,
@@ -225,70 +161,6 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3
diffuseColor += att * lights[1].intensity * diffuse * lights[1].color;
specularColor += att * specular;
-
- // 2
- if (lightCount < 3)
- return;
- att = 1.0;
- if ( lights[2].type != TYPE_DIRECTIONAL ) {
- s = lights[2].position - vpos;
- if (length( lights[2].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[2].attenuation.x + lights[2].attenuation.y * dist + lights[2].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[2].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[2].direction))) ) > lights[2].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( -lights[2].direction );
- }
-
- diffuse = max( dot( s, n ), 0.0 );
-
- specular = 0.0;
- if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
- FP vec3 r = reflect( -s, n );
- FP vec3 v = normalize( eye - vpos );
- FP float normFactor = ( shininess + 2.0 ) / 2.0;
- specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
- }
-
- diffuseColor += att * lights[2].intensity * diffuse * lights[2].color;
- specularColor += att * specular;
-
- // 3
- if (lightCount < 4)
- return;
- att = 1.0;
- if ( lights[3].type != TYPE_DIRECTIONAL ) {
- s = lights[3].position - vpos;
- if (length( lights[3].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[3].attenuation.x + lights[3].attenuation.y * dist + lights[3].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[3].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[3].direction))) ) > lights[3].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( -lights[3].direction );
- }
-
- diffuse = max( dot( s, n ), 0.0 );
-
- specular = 0.0;
- if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
- FP vec3 r = reflect( -s, n );
- FP vec3 v = normalize( eye - vpos );
- FP float normFactor = ( shininess + 2.0 ) / 2.0;
- specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
- }
-
- diffuseColor += att * lights[3].intensity * diffuse * lights[3].color;
- specularColor += att * specular;
}
void adModel(const in FP vec3 vpos, const in FP vec3 vnormal, out FP vec3 diffuseColor)
@@ -343,50 +215,4 @@ void adModel(const in FP vec3 vpos, const in FP vec3 vnormal, out FP vec3 diffus
diffuse = max( dot( s, n ), 0.0 );
diffuseColor += att * lights[1].intensity * diffuse * lights[1].color;
-
- // 2
- if (lightCount < 3)
- return;
- att = 1.0;
- if ( lights[2].type != TYPE_DIRECTIONAL ) {
- s = lights[2].position - vpos;
- if (length( lights[2].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[2].attenuation.x + lights[2].attenuation.y * dist + lights[2].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[2].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[2].direction))) ) > lights[2].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( -lights[2].direction );
- }
-
- diffuse = max( dot( s, n ), 0.0 );
-
- diffuseColor += att * lights[2].intensity * diffuse * lights[2].color;
-
- // 3
- if (lightCount < 4)
- return;
- att = 1.0;
- if ( lights[3].type != TYPE_DIRECTIONAL ) {
- s = lights[3].position - vpos;
- if (length( lights[3].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[3].attenuation.x + lights[3].attenuation.y * dist + lights[3].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[3].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[3].direction))) ) > lights[3].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( -lights[3].direction );
- }
-
- diffuse = max( dot( s, n ), 0.0 );
-
- diffuseColor += att * lights[3].intensity * diffuse * lights[3].color;
}
diff --git a/src/render/texture/qabstracttextureimage.cpp b/src/render/texture/qabstracttextureimage.cpp
index 02cfdab9b..ad631f46a 100644
--- a/src/render/texture/qabstracttextureimage.cpp
+++ b/src/render/texture/qabstracttextureimage.cpp
@@ -47,10 +47,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QAbstractTextureImagePrivate
- \internal
-*/
/*!
\qmltype AbstractTextureImage
diff --git a/src/render/texture/qabstracttextureprovider.cpp b/src/render/texture/qabstracttextureprovider.cpp
index 2a679559f..97bf648a1 100644
--- a/src/render/texture/qabstracttextureprovider.cpp
+++ b/src/render/texture/qabstracttextureprovider.cpp
@@ -48,10 +48,6 @@ using namespace Qt3DCore;
namespace Qt3DRender {
-/*!
- \class Qt3DRender::QAbstractTextureProviderPrivate
- \internal
-*/
QAbstractTextureProviderPrivate::QAbstractTextureProviderPrivate()
: QNodePrivate()
, m_target(QAbstractTextureProvider::Target2D)
diff --git a/src/render/texture/texture.cpp b/src/render/texture/texture.cpp
index 85ed3da96..6c3288720 100644
--- a/src/render/texture/texture.cpp
+++ b/src/render/texture/texture.cpp
@@ -80,7 +80,6 @@ Texture::Texture()
, m_filtersAndWrapUpdated(false)
, m_dataUploadRequired(false)
, m_unique(false)
- , m_lock(new QMutex())
, m_textureDNA(0)
, m_textureManager(Q_NULLPTR)
, m_textureImageManager(Q_NULLPTR)
@@ -91,9 +90,6 @@ Texture::Texture()
Texture::~Texture()
{
- if (m_lock != Q_NULLPTR)
- delete m_lock;
- m_lock = Q_NULLPTR;
}
void Texture::cleanup()
@@ -133,7 +129,7 @@ void Texture::updateFromPeer(Qt3DCore::QNode *peer)
{
QAbstractTextureProvider *texture = static_cast<QAbstractTextureProvider *>(peer);
- QMutexLocker lock(m_lock);
+ QMutexLocker lock(&m_lock);
if (texture != Q_NULLPTR) {
m_isDirty = true;
m_width = texture->width();
@@ -176,7 +172,7 @@ QOpenGLTexture *Texture::getOrCreateGLTexture()
// we are receiving a sceneChangeEvent that modifies isDirty or one of the properties
// at the same time
- QMutexLocker lock(m_lock);
+ QMutexLocker lock(&m_lock);
if (m_isDirty) {
delete m_gl;
m_gl = Q_NULLPTR;
@@ -450,7 +446,7 @@ GLint Texture::textureId()
// Any Thread
bool Texture::isTextureReset() const
{
- QMutexLocker lock(m_lock);
+ QMutexLocker lock(&m_lock);
return m_isDirty;
}
@@ -498,7 +494,7 @@ void Texture::setMipLevels(int mipLevels)
void Texture::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
{
// The QOpenGLTexture has to be manipulated from the RenderThread only
- QMutexLocker lock(m_lock);
+ QMutexLocker lock(&m_lock);
// We lock here so that we're sure the texture cannot be rebuilt while we are
// modifying one of its properties
QScenePropertyChangePtr propertyChange = qSharedPointerCast<QScenePropertyChange>(e);
diff --git a/src/render/texture/texture_p.h b/src/render/texture/texture_p.h
index e7ba71739..f2b6fee9a 100644
--- a/src/render/texture/texture_p.h
+++ b/src/render/texture/texture_p.h
@@ -151,7 +151,7 @@ private:
bool m_formatWasSpecified;
bool m_unique;
- QMutex *m_lock;
+ mutable QMutex m_lock;
TextureDNA m_textureDNA;
TextureManager *m_textureManager;
TextureImageManager *m_textureImageManager;