summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2020-01-22 21:35:32 +0000
committerMike Krus <mike.krus@kdab.com>2020-02-27 06:29:57 +0000
commit17706144e9dc6c2dfde580b7821f18c5f6924682 (patch)
tree5f77929db358607fe63a1d438b7a746a6966cbfb
parent7f625e93620b313466d0223e911c0c3a5b492617 (diff)
Geometry refactoring
Move QBuffer, QAttribute, QGeometry to Qt3DCore. Change-Id: I59dfd091eefadcada93350b3aba955f40b304385 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--examples/qt3d/instanced-arrays-qml/instancebuffer.cpp2
-rw-r--r--examples/qt3d/instanced-arrays-qml/instancebuffer.h4
-rw-r--r--src/animation/backend/animationclip.cpp4
-rw-r--r--src/animation/backend/gltfimporter.cpp36
-rw-r--r--src/animation/backend/gltfimporter_p.h8
-rw-r--r--src/animation/frontend/qmorphinganimation.cpp8
-rw-r--r--src/animation/frontend/qmorphtarget.cpp22
-rw-r--r--src/animation/frontend/qmorphtarget.h14
-rw-r--r--src/animation/frontend/qmorphtarget_p.h2
-rw-r--r--src/animation/frontend/qvertexblendanimation.cpp12
-rw-r--r--src/core/core.pri2
-rw-r--r--src/core/core.pro1
-rw-r--r--src/core/geometry/geometry.pri17
-rw-r--r--src/core/geometry/qabstractfunctor.cpp (renamed from src/render/frontend/qabstractfunctor.cpp)16
-rw-r--r--src/core/geometry/qabstractfunctor.h (renamed from src/render/frontend/qabstractfunctor.h)16
-rw-r--r--src/core/geometry/qattribute.cpp (renamed from src/render/geometry/qattribute.cpp)25
-rw-r--r--src/core/geometry/qattribute.h (renamed from src/render/geometry/qattribute.h)16
-rw-r--r--src/core/geometry/qattribute_p.h (renamed from src/render/geometry/qattribute_p.h)18
-rw-r--r--src/core/geometry/qbuffer.cpp (renamed from src/render/geometry/qbuffer.cpp)24
-rw-r--r--src/core/geometry/qbuffer.h (renamed from src/render/geometry/qbuffer.h)14
-rw-r--r--src/core/geometry/qbuffer_p.h (renamed from src/render/geometry/qbuffer_p.h)18
-rw-r--r--src/core/geometry/qgeometry.cpp (renamed from src/render/geometry/qgeometry.cpp)28
-rw-r--r--src/core/geometry/qgeometry.h (renamed from src/render/geometry/qgeometry.h)20
-rw-r--r--src/core/geometry/qgeometry_p.h (renamed from src/render/geometry/qgeometry_p.h)17
-rw-r--r--src/core/geometry/qgeometryfactory_p.h (renamed from src/render/geometry/qgeometryfactory_p.h)17
-rw-r--r--src/core/qurlhelper.cpp (renamed from src/render/io/qurlhelper.cpp)4
-rw-r--r--src/core/qurlhelper_p.h (renamed from src/render/io/qurlhelper_p.h)14
-rw-r--r--src/doc/src/qt3drender-geometry.qdoc12
-rw-r--r--src/extras/3dtext/qextrudedtextgeometry.cpp38
-rw-r--r--src/extras/3dtext/qextrudedtextgeometry.h20
-rw-r--r--src/extras/3dtext/qextrudedtextgeometry_p.h19
-rw-r--r--src/extras/geometries/qconegeometry.cpp12
-rw-r--r--src/extras/geometries/qconegeometry.h22
-rw-r--r--src/extras/geometries/qconegeometry_p.h22
-rw-r--r--src/extras/geometries/qconemesh.cpp4
-rw-r--r--src/extras/geometries/qconemesh.h2
-rw-r--r--src/extras/geometries/qcuboidgeometry.cpp24
-rw-r--r--src/extras/geometries/qcuboidgeometry.h28
-rw-r--r--src/extras/geometries/qcuboidgeometry_p.h23
-rw-r--r--src/extras/geometries/qcuboidmesh.h2
-rw-r--r--src/extras/geometries/qcylindergeometry.cpp12
-rw-r--r--src/extras/geometries/qcylindergeometry.h24
-rw-r--r--src/extras/geometries/qcylindergeometry_p.h21
-rw-r--r--src/extras/geometries/qcylindermesh.cpp5
-rw-r--r--src/extras/geometries/qcylindermesh.h4
-rw-r--r--src/extras/geometries/qplanegeometry.cpp10
-rw-r--r--src/extras/geometries/qplanegeometry.h28
-rw-r--r--src/extras/geometries/qplanegeometry_p.h23
-rw-r--r--src/extras/geometries/qplanemesh.h4
-rw-r--r--src/extras/geometries/qspheregeometry.cpp12
-rw-r--r--src/extras/geometries/qspheregeometry.h28
-rw-r--r--src/extras/geometries/qspheregeometry_p.h27
-rw-r--r--src/extras/geometries/qspheremesh.h2
-rw-r--r--src/extras/geometries/qtorusgeometry.cpp12
-rw-r--r--src/extras/geometries/qtorusgeometry.h24
-rw-r--r--src/extras/geometries/qtorusgeometry_p.h23
-rw-r--r--src/extras/geometries/qtorusmesh.h2
-rw-r--r--src/extras/text/distancefieldtextrenderer.cpp34
-rw-r--r--src/extras/text/distancefieldtextrenderer_p_p.h19
-rw-r--r--src/extras/text/qtext2dentity.cpp6
-rw-r--r--src/extras/text/qtextureatlas.cpp2
-rw-r--r--src/plugins/geometryloaders/default/basegeometryloader.cpp10
-rw-r--r--src/plugins/geometryloaders/default/basegeometryloader_p.h10
-rw-r--r--src/plugins/geometryloaders/fbx/fbxgeometryloader.cpp6
-rw-r--r--src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp16
-rw-r--r--src/plugins/geometryloaders/gltf/gltfgeometryloader.h21
-rw-r--r--src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp6
-rw-r--r--src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h4
-rw-r--r--src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp6
-rw-r--r--src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h1
-rw-r--r--src/plugins/renderers/opengl/renderer/renderer.cpp2
-rw-r--r--src/plugins/renderers/opengl/renderer/renderview.cpp10
-rw-r--r--src/plugins/sceneparsers/assimp/assimpimporter.cpp28
-rw-r--r--src/plugins/sceneparsers/gltf/gltfimporter.cpp8
-rw-r--r--src/plugins/sceneparsers/gltf/gltfimporter.h10
-rw-r--r--src/plugins/sceneparsers/gltfexport/gltfexporter.cpp6
-rw-r--r--src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp12
-rw-r--r--src/quick3d/imports/render/qt3dquick3drenderplugin.cpp12
-rw-r--r--src/quick3d/quick3d/items/items.pri8
-rw-r--r--src/quick3d/quick3d/items/quick3dbuffer.cpp (renamed from src/quick3d/quick3drender/items/quick3dbuffer.cpp)20
-rw-r--r--src/quick3d/quick3d/items/quick3dbuffer_p.h (renamed from src/quick3d/quick3drender/items/quick3dbuffer_p.h)14
-rw-r--r--src/quick3d/quick3d/items/quick3dgeometry.cpp (renamed from src/quick3d/quick3drender/items/quick3dgeometry.cpp)30
-rw-r--r--src/quick3d/quick3d/items/quick3dgeometry_p.h (renamed from src/quick3d/quick3drender/items/quick3dgeometry_p.h)28
-rw-r--r--src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp16
-rw-r--r--src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h12
-rw-r--r--src/quick3d/quick3drender/items/items.pri4
-rw-r--r--src/quick3d/quick3dscene2d/items/scene2d.cpp2
-rw-r--r--src/render/backend/bufferutils_p.h28
-rw-r--r--src/render/backend/buffervisitor_p.h18
-rw-r--r--src/render/backend/trianglesvisitor.cpp2
-rw-r--r--src/render/backend/trianglesvisitor_p.h1
-rw-r--r--src/render/backend/visitorutils_p.h42
-rw-r--r--src/render/framegraph/qbuffercapture.h2
-rw-r--r--src/render/frontend/qrenderaspect.cpp20
-rw-r--r--src/render/frontend/render-frontend.pri2
-rw-r--r--src/render/geometry/attribute.cpp3
-rw-r--r--src/render/geometry/attribute_p.h10
-rw-r--r--src/render/geometry/buffer.cpp24
-rw-r--r--src/render/geometry/buffer_p.h22
-rw-r--r--src/render/geometry/geometry.cpp6
-rw-r--r--src/render/geometry/geometry.pri10
-rw-r--r--src/render/geometry/geometryrenderer.cpp6
-rw-r--r--src/render/geometry/geometryrenderer_p.h8
-rw-r--r--src/render/geometry/gltfskeletonloader.cpp2
-rw-r--r--src/render/geometry/gltfskeletonloader_p.h8
-rw-r--r--src/render/geometry/qgeometryrenderer.cpp2
-rw-r--r--src/render/geometry/qgeometryrenderer.h16
-rw-r--r--src/render/geometry/qgeometryrenderer_p.h6
-rw-r--r--src/render/geometry/qmesh.cpp16
-rw-r--r--src/render/geometry/qmesh_p.h9
-rw-r--r--src/render/io/io.pri2
-rw-r--r--src/render/io/qgeometryloaderinterface_p.h8
-rw-r--r--src/render/jobs/calcboundingvolumejob.cpp10
-rw-r--r--src/render/jobs/loadbufferjob.cpp6
-rw-r--r--src/render/jobs/loadscenejob.cpp4
-rw-r--r--src/render/jobs/loadskeletonjob.cpp4
-rw-r--r--src/render/jobs/sendbuffercapturejob.cpp6
-rw-r--r--src/render/materialsystem/parameter.cpp1
-rw-r--r--src/render/materialsystem/qshaderprogram.cpp4
-rw-r--r--src/render/materialsystem/qshaderprogrambuilder.cpp1
-rw-r--r--src/render/materialsystem/shaderbuilder.cpp4
-rw-r--r--src/render/picking/objectpicker.cpp1
-rw-r--r--src/render/picking/qobjectpicker.cpp2
-rw-r--r--src/render/picking/qobjectpicker.h1
-rw-r--r--src/render/texture/qtexture.cpp4
-rw-r--r--src/render/texture/qtexturegenerator_p.h4
-rw-r--r--src/render/texture/qtextureimage_p.h1
-rw-r--r--src/render/texture/qtextureimagedata.cpp2
-rw-r--r--src/render/texture/qtextureimagedatagenerator.h5
-rw-r--r--tests/auto/animation/qmorphinganimation/tst_qmorphinganimation.cpp18
-rw-r--r--tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp32
-rw-r--r--tests/auto/extras/common/geometrytesthelper.h14
-rw-r--r--tests/auto/extras/qcuboidgeometry/tst_qcuboidgeometry.cpp28
-rw-r--r--tests/auto/extras/qtorusgeometry/tst_qtorusgeometry.cpp28
-rw-r--r--tests/auto/quick3d/3dcore/3dcore.qml4
-rw-r--r--tests/auto/quick3d/3drender/3drender.qml4
-rw-r--r--tests/auto/quick3d/quick3dbuffer/quick3dbuffer.pro2
-rw-r--r--tests/auto/quick3d/quick3dbuffer/tst_quick3dbuffer.cpp6
-rw-r--r--tests/auto/render/attribute/tst_attribute.cpp46
-rw-r--r--tests/auto/render/boundingsphere/tst_boundingsphere.cpp34
-rw-r--r--tests/auto/render/buffer/tst_buffer.cpp38
-rw-r--r--tests/auto/render/coordinatereader/tst_coordinatereader.cpp70
-rw-r--r--tests/auto/render/geometry/tst_geometry.cpp32
-rw-r--r--tests/auto/render/geometryloaders/tst_geometryloaders.cpp5
-rw-r--r--tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp14
-rw-r--r--tests/auto/render/gltfplugins/tst_gltfplugins.cpp136
-rw-r--r--tests/auto/render/meshfunctors/tst_meshfunctors.cpp33
-rw-r--r--tests/auto/render/opengl/textures/tst_textures.cpp4
-rw-r--r--tests/auto/render/picking/tst_picking.cpp6
-rw-r--r--tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp18
-rw-r--r--tests/auto/render/qattribute/tst_qattribute.cpp56
-rw-r--r--tests/auto/render/qbuffer/tst_qbuffer.cpp12
-rw-r--r--tests/auto/render/qgeometry/tst_qgeometry.cpp24
-rw-r--r--tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp18
-rw-r--r--tests/auto/render/scene2d/tst_scene2d.cpp22
-rw-r--r--tests/auto/render/segmentvisitor/tst_segmentvisitor.cpp130
-rw-r--r--tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp162
-rw-r--r--tests/auto/render/updatemeshtrianglelistjob/tst_updatemeshtrianglelistjob.cpp12
-rw-r--r--tests/manual/buffercapture-qml/main.cpp4
-rw-r--r--tests/manual/custom-mesh-cpp-indirect/main.cpp82
-rw-r--r--tests/manual/custom-mesh-cpp/main.cpp42
-rw-r--r--tests/manual/custom-mesh-update-data-cpp/main.cpp38
-rw-r--r--tests/manual/mesh-morphing/main.cpp4
-rw-r--r--tests/manual/tessellation-modes/tessellatedquadmesh.cpp22
164 files changed, 1379 insertions, 1385 deletions
diff --git a/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp b/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp
index 770d1b425..bf76706f0 100644
--- a/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp
+++ b/examples/qt3d/instanced-arrays-qml/instancebuffer.cpp
@@ -57,7 +57,7 @@ static const int colCount = 20;
static const int maxInstanceCount = rowCount * colCount;
InstanceBuffer::InstanceBuffer(Qt3DCore::QNode *parent)
- : Qt3DRender::QBuffer(parent)
+ : Qt3DCore::QBuffer(parent)
, m_instanceCount(maxInstanceCount)
{
// Create some per instance data - position of each instance
diff --git a/examples/qt3d/instanced-arrays-qml/instancebuffer.h b/examples/qt3d/instanced-arrays-qml/instancebuffer.h
index 0c769cbf4..c26a85692 100644
--- a/examples/qt3d/instanced-arrays-qml/instancebuffer.h
+++ b/examples/qt3d/instanced-arrays-qml/instancebuffer.h
@@ -51,9 +51,9 @@
#ifndef INSTANCEBUFFER_H
#define INSTANCEBUFFER_H
-#include <Qt3DRender/QBuffer>
+#include <Qt3DCore/QBuffer>
-class InstanceBuffer : public Qt3DRender::QBuffer
+class InstanceBuffer : public Qt3DCore::QBuffer
{
Q_OBJECT
Q_PROPERTY(int instanceCount READ instanceCount WRITE setInstanceCount NOTIFY instanceCountChanged)
diff --git a/src/animation/backend/animationclip.cpp b/src/animation/backend/animationclip.cpp
index 2c7e4fffb..9f18b5eed 100644
--- a/src/animation/backend/animationclip.cpp
+++ b/src/animation/backend/animationclip.cpp
@@ -42,7 +42,7 @@
#include <Qt3DAnimation/private/animationlogging_p.h>
#include <Qt3DAnimation/private/managers_p.h>
#include <Qt3DAnimation/private/gltfimporter_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qfile.h>
@@ -187,7 +187,7 @@ void AnimationClip::loadAnimation()
void AnimationClip::loadAnimationFromUrl()
{
// TODO: Handle remote files
- QString filePath = Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(m_source);
+ QString filePath = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(m_source);
QFile file(filePath);
if (!file.open(QIODevice::ReadOnly)) {
qWarning() << "Could not find animation clip:" << filePath;
diff --git a/src/animation/backend/gltfimporter.cpp b/src/animation/backend/gltfimporter.cpp
index f7907b3c2..82401dd5e 100644
--- a/src/animation/backend/gltfimporter.cpp
+++ b/src/animation/backend/gltfimporter.cpp
@@ -193,7 +193,7 @@ GLTFImporter::BufferView::BufferView(const QJsonObject &json)
}
GLTFImporter::AccessorData::AccessorData()
- : type(Qt3DRender::QAttribute::Float)
+ : type(Qt3DCore::QAttribute::Float)
, dataSize(0)
, count(0)
, byteOffset(0)
@@ -369,39 +369,39 @@ GLTFImporter::Node::Node(const QJsonObject &json)
skinIndex = skinValue.toInt();
}
-Qt3DRender::QAttribute::VertexBaseType GLTFImporter::accessorTypeFromJSON(int componentType)
+Qt3DCore::QAttribute::VertexBaseType GLTFImporter::accessorTypeFromJSON(int componentType)
{
if (componentType == GL_BYTE)
- return Qt3DRender::QAttribute::Byte;
+ return Qt3DCore::QAttribute::Byte;
else if (componentType == GL_UNSIGNED_BYTE)
- return Qt3DRender::QAttribute::UnsignedByte;
+ return Qt3DCore::QAttribute::UnsignedByte;
else if (componentType == GL_SHORT)
- return Qt3DRender::QAttribute::Short;
+ return Qt3DCore::QAttribute::Short;
else if (componentType == GL_UNSIGNED_SHORT)
- return Qt3DRender::QAttribute::UnsignedShort;
+ return Qt3DCore::QAttribute::UnsignedShort;
else if (componentType == GL_UNSIGNED_INT)
- return Qt3DRender::QAttribute::UnsignedInt;
+ return Qt3DCore::QAttribute::UnsignedInt;
else if (componentType == GL_FLOAT)
- return Qt3DRender::QAttribute::Float;
+ return Qt3DCore::QAttribute::Float;
// There shouldn't be an invalid case here
qWarning("unsupported accessor type %d", componentType);
- return Qt3DRender::QAttribute::Float;
+ return Qt3DCore::QAttribute::Float;
}
-uint GLTFImporter::accessorTypeSize(Qt3DRender::QAttribute::VertexBaseType componentType)
+uint GLTFImporter::accessorTypeSize(Qt3DCore::QAttribute::VertexBaseType componentType)
{
switch (componentType) {
- case Qt3DRender::QAttribute::Byte:
- case Qt3DRender::QAttribute::UnsignedByte:
+ case Qt3DCore::QAttribute::Byte:
+ case Qt3DCore::QAttribute::UnsignedByte:
return 1;
- case Qt3DRender::QAttribute::Short:
- case Qt3DRender::QAttribute::UnsignedShort:
+ case Qt3DCore::QAttribute::Short:
+ case Qt3DCore::QAttribute::UnsignedShort:
return 2;
- case Qt3DRender::QAttribute::Int:
- case Qt3DRender::QAttribute::Float:
+ case Qt3DCore::QAttribute::Int:
+ case Qt3DCore::QAttribute::Float:
return 4;
default:
@@ -522,12 +522,12 @@ GLTFImporter::AnimationNameAndChannels GLTFImporter::createAnimationData(int ani
const auto &inputAccessor = m_accessors[sampler.inputAccessorIndex];
const auto &outputAccessor = m_accessors[sampler.outputAccessorIndex];
- if (inputAccessor.type != Qt3DRender::QAttribute::Float) {
+ if (inputAccessor.type != Qt3DCore::QAttribute::Float) {
qWarning() << "Input accessor has wrong data type. Skipping channel.";
continue;
}
- if (outputAccessor.type != Qt3DRender::QAttribute::Float) {
+ if (outputAccessor.type != Qt3DCore::QAttribute::Float) {
qWarning() << "Output accessor has wrong data type. Skipping channel.";
continue;
}
diff --git a/src/animation/backend/gltfimporter_p.h b/src/animation/backend/gltfimporter_p.h
index e31f8d078..ef0486181 100644
--- a/src/animation/backend/gltfimporter_p.h
+++ b/src/animation/backend/gltfimporter_p.h
@@ -50,7 +50,7 @@
#include <QtGlobal>
#include <Qt3DAnimation/private/fcurve_p.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qattribute.h>
#include <Qt3DCore/private/sqt_p.h>
#include <Qt3DCore/private/qmath3d_p.h>
@@ -100,7 +100,7 @@ public:
explicit AccessorData(const QJsonObject &json);
int bufferViewIndex;
- Qt3DRender::QAttribute::VertexBaseType type;
+ Qt3DCore::QAttribute::VertexBaseType type;
uint dataSize;
int count;
int byteOffset;
@@ -190,8 +190,8 @@ public:
AnimationNameAndChannels createAnimationData(int animationIndex, const QString &animationName = QString()) const;
private:
- static Qt3DRender::QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
- static uint accessorTypeSize(Qt3DRender::QAttribute::VertexBaseType componentType);
+ static Qt3DCore::QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
+ static uint accessorTypeSize(Qt3DCore::QAttribute::VertexBaseType componentType);
static uint accessorDataSizeFromJson(const QString &type);
struct RawData
diff --git a/src/animation/frontend/qmorphinganimation.cpp b/src/animation/frontend/qmorphinganimation.cpp
index c73a6abd7..5b16668f9 100644
--- a/src/animation/frontend/qmorphinganimation.cpp
+++ b/src/animation/frontend/qmorphinganimation.cpp
@@ -50,7 +50,7 @@ namespace Qt3DAnimation {
A Qt3DAnimation::QMorphingAnimation class implements blend-shape morphing animation
to a target \l {Qt3DRender::QGeometryRenderer}{QGeometryRenderer}. The QMorphingAnimation
- sets the correct \l {Qt3DRender::QAttribute}{QAttributes} from the
+ sets the correct \l {Qt3DCore::QAttribute}{QAttributes} from the
\l {Qt3DAnimation::QMorphTarget}{morph targets} to the target
\l {Qt3DRender::QGeometryRenderer::geometry} {QGeometryRenderer::geometry} and calculates
interpolator for the current position. The actual blending between the attributes must
@@ -248,16 +248,16 @@ void QMorphingAnimationPrivate::updateAnimation(float position)
void QMorphingAnimationPrivate::setTargetInterpolated(int morphTarget)
{
QMorphTarget *target = m_morphTargets[morphTarget];
- Qt3DRender::QGeometry *geometry = m_target->geometry();
+ Qt3DCore::QGeometry *geometry = m_target->geometry();
// remove attributes from previous frame
if (m_currentTarget && (target != m_currentTarget)) {
- const QVector<Qt3DRender::QAttribute *> targetAttributes = m_currentTarget->attributeList();
+ const QVector<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList();
for (int i = 0; i < targetAttributes.size(); ++i)
geometry->removeAttribute(targetAttributes.at(i));
}
- const QVector<Qt3DRender::QAttribute *> targetAttributes = target->attributeList();
+ const QVector<Qt3DCore::QAttribute *> targetAttributes = target->attributeList();
// add attributes from current frame to the geometry
if (target != m_currentTarget) {
diff --git a/src/animation/frontend/qmorphtarget.cpp b/src/animation/frontend/qmorphtarget.cpp
index da068d477..1edaf2445 100644
--- a/src/animation/frontend/qmorphtarget.cpp
+++ b/src/animation/frontend/qmorphtarget.cpp
@@ -49,9 +49,9 @@ namespace Qt3DAnimation {
\inherits QObject
A Qt3DAnimation::QMorphTarget class is a convenience class, which provides a list
- of \l {Qt3DRender::QAttribute} {QAttributes}, which the QMorphingAnimation uses
+ of \l {Qt3DCore::QAttribute} {QAttributes}, which the QMorphingAnimation uses
to animate geometry. A QMorphTarget can also be created based on existing
- \l Qt3DRender::QGeometry.
+ \l Qt3DCore::QGeometry.
*/
/*!
@@ -99,7 +99,7 @@ QMorphTargetPrivate::QMorphTargetPrivate()
void QMorphTargetPrivate::updateAttributeNames()
{
m_attributeNames.clear();
- for (const Qt3DRender::QAttribute *attr : qAsConst(m_targetAttributes))
+ for (const Qt3DCore::QAttribute *attr : qAsConst(m_targetAttributes))
m_attributeNames.push_back(attr->name());
}
@@ -115,7 +115,7 @@ QMorphTarget::QMorphTarget(QObject *parent)
/*!
Returns a list of attributes contained in the morph target.
*/
-QVector<Qt3DRender::QAttribute *> QMorphTarget::attributeList() const
+QVector<Qt3DCore::QAttribute *> QMorphTarget::attributeList() const
{
Q_D(const QMorphTarget);
return d->m_targetAttributes;
@@ -130,12 +130,12 @@ QStringList QMorphTarget::attributeNames() const
/*!
Sets \a attributes to the morph target. Old attributes are cleared.
*/
-void QMorphTarget::setAttributes(const QVector<Qt3DRender::QAttribute *> &attributes)
+void QMorphTarget::setAttributes(const QVector<Qt3DCore::QAttribute *> &attributes)
{
Q_D(QMorphTarget);
d->m_targetAttributes = attributes;
d->m_attributeNames.clear();
- for (const Qt3DRender::QAttribute *attr : attributes)
+ for (const Qt3DCore::QAttribute *attr : attributes)
d->m_attributeNames.push_back(attr->name());
emit attributeNamesChanged(d->m_attributeNames);
@@ -145,10 +145,10 @@ void QMorphTarget::setAttributes(const QVector<Qt3DRender::QAttribute *> &attrib
Adds an \a attribute the morph target. An attribute with the same
name must not have been added previously to the morph target.
*/
-void QMorphTarget::addAttribute(Qt3DRender::QAttribute *attribute)
+void QMorphTarget::addAttribute(Qt3DCore::QAttribute *attribute)
{
Q_D(QMorphTarget);
- for (const Qt3DRender::QAttribute *attr : qAsConst(d->m_targetAttributes)) {
+ for (const Qt3DCore::QAttribute *attr : qAsConst(d->m_targetAttributes)) {
if (attr->name() == attribute->name())
return;
}
@@ -160,7 +160,7 @@ void QMorphTarget::addAttribute(Qt3DRender::QAttribute *attribute)
/*!
Removes an \a attribute from the morph target.
*/
-void QMorphTarget::removeAttribute(Qt3DRender::QAttribute *attribute)
+void QMorphTarget::removeAttribute(Qt3DCore::QAttribute *attribute)
{
Q_D(QMorphTarget);
if (d->m_targetAttributes.contains(attribute)) {
@@ -173,11 +173,11 @@ void QMorphTarget::removeAttribute(Qt3DRender::QAttribute *attribute)
/*!
Returns a morph target based on the \a attributes in the given \a geometry.
*/
-QMorphTarget *QMorphTarget::fromGeometry(Qt3DRender::QGeometry *geometry, const QStringList &attributes)
+QMorphTarget *QMorphTarget::fromGeometry(Qt3DCore::QGeometry *geometry, const QStringList &attributes)
{
QMorphTarget *target = new QMorphTarget();
const auto geometryAttributes = geometry->attributes();
- for (Qt3DRender::QAttribute *attr : geometryAttributes) {
+ for (Qt3DCore::QAttribute *attr : geometryAttributes) {
if (attributes.contains(attr->name()))
target->addAttribute(attr);
}
diff --git a/src/animation/frontend/qmorphtarget.h b/src/animation/frontend/qmorphtarget.h
index ec9761c64..210a3be41 100644
--- a/src/animation/frontend/qmorphtarget.h
+++ b/src/animation/frontend/qmorphtarget.h
@@ -37,8 +37,8 @@
#ifndef QT3DANIMATION_QMORPHTARGET_H
#define QT3DANIMATION_QMORPHTARGET_H
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qgeometry.h>
#include <QtCore/qstringlist.h>
@@ -58,14 +58,14 @@ class Q_3DANIMATIONSHARED_EXPORT QMorphTarget : public QObject
public:
explicit QMorphTarget(QObject *parent = nullptr);
- QVector<Qt3DRender::QAttribute *> attributeList() const;
+ QVector<Qt3DCore::QAttribute *> attributeList() const;
QStringList attributeNames() const;
- void setAttributes(const QVector<Qt3DRender::QAttribute *> &attributes);
- void addAttribute(Qt3DRender::QAttribute *attribute);
- void removeAttribute(Qt3DRender::QAttribute *attribute);
+ void setAttributes(const QVector<Qt3DCore::QAttribute *> &attributes);
+ void addAttribute(Qt3DCore::QAttribute *attribute);
+ void removeAttribute(Qt3DCore::QAttribute *attribute);
- Q_INVOKABLE static QMorphTarget *fromGeometry(Qt3DRender::QGeometry *geometry,
+ Q_INVOKABLE static QMorphTarget *fromGeometry(Qt3DCore::QGeometry *geometry,
const QStringList &attributes);
Q_SIGNALS:
diff --git a/src/animation/frontend/qmorphtarget_p.h b/src/animation/frontend/qmorphtarget_p.h
index 1fc3734ae..3214043f4 100644
--- a/src/animation/frontend/qmorphtarget_p.h
+++ b/src/animation/frontend/qmorphtarget_p.h
@@ -64,7 +64,7 @@ public:
void updateAttributeNames();
QStringList m_attributeNames;
- QVector<Qt3DRender::QAttribute *> m_targetAttributes;
+ QVector<Qt3DCore::QAttribute *> m_targetAttributes;
Q_DECLARE_PUBLIC(QMorphTarget)
};
diff --git a/src/animation/frontend/qvertexblendanimation.cpp b/src/animation/frontend/qvertexblendanimation.cpp
index 143b9553a..77ba9a301 100644
--- a/src/animation/frontend/qvertexblendanimation.cpp
+++ b/src/animation/frontend/qvertexblendanimation.cpp
@@ -51,7 +51,7 @@ namespace Qt3DAnimation {
A Qt3DAnimation::QVertexBlendAnimation class implements vertex-blend morphing animation
to a target \l {Qt3DRender::QGeometryRenderer}{QGeometryRenderer}. The QVertexBlendAnimation
- sets the correct \l {Qt3DRender::QAttribute}{QAttributes} from the
+ sets the correct \l {Qt3DCore::QAttribute}{QAttributes} from the
\l {Qt3DAnimation::QMorphTarget}{morph targets} to the target
\l {Qt3DRender::QGeometryRenderer::geometry} {QGeometryRenderer::geometry} and calculates
interpolator for the current position. Unlike with QMorphingAnimation, where the blending is
@@ -189,21 +189,21 @@ void QVertexBlendAnimationPrivate::updateAnimation(float position)
base = m_morphTargets.at(target0);
target = m_morphTargets.at(target1);
- Qt3DRender::QGeometry *geometry = m_target->geometry();
+ Qt3DCore::QGeometry *geometry = m_target->geometry();
// remove attributes from previous frame
if (m_currentBase && m_currentTarget &&
(base != m_currentBase || target != m_currentTarget)) {
- const QVector<Qt3DRender::QAttribute *> baseAttributes = m_currentBase->attributeList();
- const QVector<Qt3DRender::QAttribute *> targetAttributes = m_currentTarget->attributeList();
+ const QVector<Qt3DCore::QAttribute *> baseAttributes = m_currentBase->attributeList();
+ const QVector<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList();
for (int i = 0; i < baseAttributes.size(); ++i) {
geometry->removeAttribute(baseAttributes.at(i));
geometry->removeAttribute(targetAttributes.at(i));
}
}
- const QVector<Qt3DRender::QAttribute *> baseAttributes = base->attributeList();
- const QVector<Qt3DRender::QAttribute *> targetAttributes = target->attributeList();
+ const QVector<Qt3DCore::QAttribute *> baseAttributes = base->attributeList();
+ const QVector<Qt3DCore::QAttribute *> targetAttributes = target->attributeList();
const QStringList attributeNames = base->attributeNames();
// add attributes from current frame to the geometry
diff --git a/src/core/core.pri b/src/core/core.pri
index de80fb25f..5bc6e38d9 100644
--- a/src/core/core.pri
+++ b/src/core/core.pri
@@ -7,6 +7,7 @@ HEADERS += \
$$PWD/corelogging_p.h \
$$PWD/qchangearbiter_p.h \
$$PWD/qt3dcore_global_p.h \
+ $$PWD/qurlhelper_p.h \
$$PWD/qscene_p.h
SOURCES += \
@@ -14,4 +15,5 @@ SOURCES += \
$$PWD/qscheduler.cpp \
$$PWD/qchangearbiter.cpp \
$$PWD/corelogging.cpp \
+ $$PWD/qurlhelper.cpp \
$$PWD/qscene.cpp
diff --git a/src/core/core.pro b/src/core/core.pro
index f333725c9..9b74780ff 100644
--- a/src/core/core.pro
+++ b/src/core/core.pro
@@ -10,6 +10,7 @@ gcov {
include(core.pri)
include(aspects/aspects.pri)
+include(geometry/geometry.pri)
include(jobs/jobs.pri)
include(nodes/nodes.pri)
include(transforms/transforms.pri)
diff --git a/src/core/geometry/geometry.pri b/src/core/geometry/geometry.pri
new file mode 100644
index 000000000..13756ccb3
--- /dev/null
+++ b/src/core/geometry/geometry.pri
@@ -0,0 +1,17 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += \
+ $$PWD/qabstractfunctor.h \
+ $$PWD/qattribute.h \
+ $$PWD/qattribute_p.h \
+ $$PWD/qbuffer.h \
+ $$PWD/qbuffer_p.h \
+ $$PWD/qgeometry_p.h \
+ $$PWD/qgeometry.h \
+ $$PWD/qgeometryfactory_p.h
+
+SOURCES += \
+ $$PWD/qabstractfunctor.cpp \
+ $$PWD/qattribute.cpp \
+ $$PWD/qbuffer.cpp \
+ $$PWD/qgeometry.cpp \
diff --git a/src/render/frontend/qabstractfunctor.cpp b/src/core/geometry/qabstractfunctor.cpp
index 698c3a291..3bd774a4f 100644
--- a/src/render/frontend/qabstractfunctor.cpp
+++ b/src/core/geometry/qabstractfunctor.cpp
@@ -41,41 +41,41 @@
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
/*!
- \class Qt3DRender::QAbstractFunctor
- \inmodule Qt3DRender
+ \class Qt3DCore::QAbstractFunctor
+ \inmodule Qt3DCore
\since 5.7
\brief QAbstractFunctor is an abstract base class for all functors.
The QAbstractFunctor is used as a base class for all functors and data
- generators in Qt3DRender module.
+ generators in Qt3DCore module.
When user defines a new functor or generator, they need to implement the
\l QAbstractFunctor::id() method, which should be done using the \c {QT3D_FUNCTOR}
macro in the class definition.
*/
/*!
- \fn qintptr Qt3DRender::QAbstractFunctor::id() const
+ \fn qintptr Qt3DCore::QAbstractFunctor::id() const
Returns a pointer to the id of the functor.
*/
/*!
- \fn qintptr Qt3DRender::functorTypeId()
+ \fn qintptr Qt3DCore::functorTypeId()
Returns a pointer to the type id of the functor.
*/
/*!
\macro QT3D_FUNCTOR(Class)
- \relates Qt3DRender::QAbstractFunctor
+ \relates Qt3DCore::QAbstractFunctor
This macro assigns functor id to the \a Class, which is used by QAbstractFunctor::functor_cast
to determine if the cast can be done.
*/
/*!
- \fn template<class T> const T * Qt3DRender::QAbstractFunctor::functor_cast(const QAbstractFunctor *other) const
+ \fn template<class T> const T * Qt3DCore::QAbstractFunctor::functor_cast(const QAbstractFunctor *other) const
This method is used to cast functor \a other to type T if the other is of
type T (or of subclass); otherwise returns 0. This method works similarly
diff --git a/src/render/frontend/qabstractfunctor.h b/src/core/geometry/qabstractfunctor.h
index 45492e141..9bd6e670b 100644
--- a/src/render/frontend/qabstractfunctor.h
+++ b/src/core/geometry/qabstractfunctor.h
@@ -37,14 +37,14 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QABSTRACTFUNCTOR_H
-#define QT3DRENDER_QABSTRACTFUNCTOR_H
+#ifndef QT3DCORE_QABSTRACTFUNCTOR_H
+#define QT3DCORE_QABSTRACTFUNCTOR_H
-#include <Qt3DRender/qt3drender_global.h>
+#include <Qt3DCore/qt3dcore_global.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
// This will generate a unique id() function per type
// <=> 1 unique function address per type
@@ -69,11 +69,11 @@ qintptr functorTypeId()
#define QT3D_FUNCTOR(Class) \
qintptr id() const override { \
- return Qt3DRender::functorTypeId<Class>(); \
+ return Qt3DCore::functorTypeId<Class>(); \
}
-class Q_3DRENDERSHARED_EXPORT QAbstractFunctor
+class Q_3DCORESHARED_EXPORT QAbstractFunctor
{
public:
QAbstractFunctor() = default;
@@ -100,8 +100,8 @@ const T *functor_cast(const QAbstractFunctor *other)
return nullptr;
}
-} // Qt3D
+} // Qt3DCore
QT_END_NAMESPACE
-#endif // QT3DRENDER_QABSTRACTFUNCTOR_H
+#endif // QT3DCORE_QABSTRACTFUNCTOR_H
diff --git a/src/render/geometry/qattribute.cpp b/src/core/geometry/qattribute.cpp
index 348695e45..6be9c0203 100644
--- a/src/render/geometry/qattribute.cpp
+++ b/src/core/geometry/qattribute.cpp
@@ -39,11 +39,11 @@
#include "qattribute.h"
#include "qattribute_p.h"
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qbuffer.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
QAttributePrivate::QAttributePrivate()
: QNodePrivate()
@@ -61,8 +61,8 @@ QAttributePrivate::QAttributePrivate()
/*!
* \qmltype Attribute
- * \instantiates Qt3DRender::QAttribute
- * \inqmlmodule Qt3D.Render
+ * \instantiates Qt3DCore::QAttribute
+ * \inqmlmodule Qt3D.Core
* \brief Defines an attribute and how data should be read from a Buffer.
*
* There are 3 types of attributes.
@@ -84,9 +84,9 @@ QAttributePrivate::QAttributePrivate()
*/
/*!
- * \class Qt3DRender::QAttribute
- * \inheaderfile Qt3DRender/QAttribute
- * \inmodule Qt3DRender
+ * \class Qt3DCore::QAttribute
+ * \inheaderfile Qt3DCore/QAttribute
+ * \inmodule Qt3DCore
*
* \inherits Qt3DCore::QNode
*
@@ -113,8 +113,8 @@ QAttributePrivate::QAttributePrivate()
*/
/*!
- * \typedef Qt3DRender::QBufferPtr
- * \relates Qt3DRender::QAttribute
+ * \typedef Qt3DCore::QBufferPtr
+ * \relates Qt3DCore::QAttribute
*/
/*!
@@ -477,17 +477,16 @@ QString QAttribute::defaultTextureCoordinate2AttributeName()
}
/*!
-\fn Qt3DRender::QAttribute::dataSizeChanged(uint vertexSize)
+\fn Qt3DCore::QAttribute::dataSizeChanged(uint vertexSize)
The signal is emitted with \a vertexSize when the dataSize changes.
*/
/*!
-\fn Qt3DRender::QAttribute::dataTypeChanged(Qt3DRender::QAttribute::VertexBaseType vertexBaseType)
+\fn Qt3DCore::QAttribute::dataTypeChanged(Qt3DCore::QAttribute::VertexBaseType vertexBaseType)
The signal is emitted with \a vertexBaseType when the dataType changed.
*/
-
-} // Qt3DRender
+} // Qt3DCore
QT_END_NAMESPACE
diff --git a/src/render/geometry/qattribute.h b/src/core/geometry/qattribute.h
index ec3b65f32..aa0e5ce8b 100644
--- a/src/render/geometry/qattribute.h
+++ b/src/core/geometry/qattribute.h
@@ -37,26 +37,26 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QATTRIBUTE_H
-#define QT3DRENDER_QATTRIBUTE_H
+#ifndef QT3DCORE_QATTRIBUTE_H
+#define QT3DCORE_QATTRIBUTE_H
-#include <Qt3DRender/qt3drender_global.h>
+#include <Qt3DCore/qt3dcore_global.h>
#include <Qt3DCore/qnode.h>
#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QBuffer;
class QAttributePrivate;
typedef QSharedPointer<QBuffer> QBufferPtr;
-class Q_3DRENDERSHARED_EXPORT QAttribute : public Qt3DCore::QNode
+class Q_3DCORESHARED_EXPORT QAttribute : public QNode
{
Q_OBJECT
- Q_PROPERTY(Qt3DRender::QBuffer *buffer READ buffer WRITE setBuffer NOTIFY bufferChanged)
+ Q_PROPERTY(Qt3DCore::QBuffer *buffer READ buffer WRITE setBuffer NOTIFY bufferChanged)
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
Q_PROPERTY(VertexBaseType vertexBaseType READ vertexBaseType WRITE setVertexBaseType NOTIFY vertexBaseTypeChanged)
Q_PROPERTY(uint vertexSize READ vertexSize WRITE setVertexSize NOTIFY vertexSizeChanged)
@@ -150,8 +150,8 @@ private:
Q_DECLARE_PRIVATE(QAttribute)
};
-} // Qt3DRender
+} // Qt3DCore
QT_END_NAMESPACE
-#endif // QT3DRENDER_QATTRIBUTE_H
+#endif // QT3DCORE_QATTRIBUTE_H
diff --git a/src/render/geometry/qattribute_p.h b/src/core/geometry/qattribute_p.h
index fd6936e0d..755a62207 100644
--- a/src/render/geometry/qattribute_p.h
+++ b/src/core/geometry/qattribute_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QATTRIBUTE_P_H
-#define QT3DRENDER_QATTRIBUTE_P_H
+#ifndef QT3DCORE_QATTRIBUTE_P_H
+#define QT3DCORE_QATTRIBUTE_P_H
//
// W A R N I N G
@@ -51,18 +51,18 @@
// We mean it.
//
-#include <Qt3DRender/QAttribute>
-#include <Qt3DRender/QBuffer>
+#include <Qt3DCore/QAttribute>
+#include <Qt3DCore/QBuffer>
#include <private/qnode_p.h>
-#include <private/qt3drender_global_p.h>
+#include <private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
-class Q_3DRENDERSHARED_PRIVATE_EXPORT QAttributePrivate : public Qt3DCore::QNodePrivate
+class Q_3DCORE_PRIVATE_EXPORT QAttributePrivate : public Qt3DCore::QNodePrivate
{
public:
Q_DECLARE_PUBLIC(QAttribute)
@@ -80,8 +80,8 @@ public:
QAttribute::AttributeType m_attributeType;
};
-} // Qt3DRender
+} // Qt3DCore
QT_END_NAMESPACE
-#endif // QT3DRENDER_QATTRIBUTE_P_H
+#endif // QT3DCORE_QATTRIBUTE_P_H
diff --git a/src/render/geometry/qbuffer.cpp b/src/core/geometry/qbuffer.cpp
index 58ff304a0..1b0101c26 100644
--- a/src/render/geometry/qbuffer.cpp
+++ b/src/core/geometry/qbuffer.cpp
@@ -39,13 +39,13 @@
#include "qbuffer.h"
#include "qbuffer_p.h"
-#include <Qt3DRender/private/renderlogging_p.h>
+#include <Qt3DCore/private/corelogging_p.h>
QT_BEGIN_NAMESPACE
using namespace Qt3DCore;
-namespace Qt3DRender {
+namespace Qt3DCore {
QBufferPrivate::QBufferPrivate()
: QNodePrivate()
@@ -66,7 +66,7 @@ void QBufferPrivate::setData(const QByteArray &data)
/*!
* \qmltype Buffer
- * \instantiates Qt3DRender::QBuffer
+ * \instantiates Qt3DCore::QBuffer
* \inqmlmodule Qt3D.Render
*
* \brief Provides a data store for raw data to later be used as vertices or
@@ -88,9 +88,9 @@ void QBufferPrivate::setData(const QByteArray &data)
*/
/*!
- * \class Qt3DRender::QBuffer
- * \inheaderfile Qt3DRender/QBuffer
- * \inmodule Qt3DRender
+ * \class Qt3DCore::QBuffer
+ * \inheaderfile Qt3DCore/QBuffer
+ * \inmodule Qt3DCore
*
* \inherits Qt3DCore::QNode
*
@@ -101,13 +101,13 @@ void QBufferPrivate::setData(const QByteArray &data)
*/
/*!
- * \fn void Qt3DRender::QBuffer::dataChanged(const QByteArray &bytes)
+ * \fn void Qt3DCore::QBuffer::dataChanged(const QByteArray &bytes)
*
* This signal is emitted with \a bytes when data changes.
*/
/*!
- * \fn void Qt3DRender::QBuffer::dataAvailable()
+ * \fn void Qt3DCore::QBuffer::dataAvailable()
*
* This signal is emitted when data becomes available.
*/
@@ -172,8 +172,8 @@ void QBufferPrivate::setData(const QByteArray &data)
*/
/*!
- * \typedef Qt3DRender::QBufferDataGeneratorPtr
- * \relates Qt3DRender::QBuffer
+ * \typedef Qt3DCore::QBufferDataGeneratorPtr
+ * \relates Qt3DCore::QBuffer
*/
/*!
@@ -288,7 +288,7 @@ void QBuffer::setAccessType(QBuffer::AccessType access)
}
/*!
- * \property Qt3DRender::QBuffer::accessType
+ * \property Qt3DCore::QBuffer::accessType
*
* Returns the \l {QBuffer::}{AccessType} of the buffer.
*
@@ -309,6 +309,6 @@ void QBuffer::setType(QBuffer::BufferType type)
}
}
-} // namespace Qt3DRender
+} // namespace Qt3DCore
QT_END_NAMESPACE
diff --git a/src/render/geometry/qbuffer.h b/src/core/geometry/qbuffer.h
index fceeea2dc..d60f99fa7 100644
--- a/src/render/geometry/qbuffer.h
+++ b/src/core/geometry/qbuffer.h
@@ -37,21 +37,21 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QBUFFER_H
-#define QT3DRENDER_QBUFFER_H
+#ifndef QT3DCORE_QBUFFER_H
+#define QT3DCORE_QBUFFER_H
#include <Qt3DCore/qnode.h>
-#include <Qt3DRender/qt3drender_global.h>
+#include <Qt3DCore/qt3dcore_global.h>
#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QBufferPrivate;
-class Q_3DRENDERSHARED_EXPORT QBuffer : public Qt3DCore::QNode
+class Q_3DCORESHARED_EXPORT QBuffer : public Qt3DCore::QNode
{
Q_OBJECT
Q_PROPERTY(BufferType type READ type WRITE setType NOTIFY typeChanged)
@@ -121,8 +121,8 @@ private:
Q_DECLARE_PRIVATE(QBuffer)
};
-} // namespace Qt3DRender
+} // namespace Qt3DCore
QT_END_NAMESPACE
-#endif // QT3DRENDER_QBUFFER_H
+#endif // QT3DCORE_QBUFFER_H
diff --git a/src/render/geometry/qbuffer_p.h b/src/core/geometry/qbuffer_p.h
index b6d6318b4..c4bb9d834 100644
--- a/src/render/geometry/qbuffer_p.h
+++ b/src/core/geometry/qbuffer_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QBUFFER_P_H
-#define QT3DRENDER_QBUFFER_P_H
+#ifndef QT3DCORE_QBUFFER_P_H
+#define QT3DCORE_QBUFFER_P_H
//
// W A R N I N G
@@ -52,16 +52,16 @@
//
#include <Qt3DCore/private/qnode_p.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qt3drender_global.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qt3dcore_global.h>
#include <private/qnode_p.h>
#include <QByteArray>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
-class Q_3DRENDERSHARED_EXPORT QBufferPrivate : public Qt3DCore::QNodePrivate
+class Q_3DCORESHARED_EXPORT QBufferPrivate : public Qt3DCore::QNodePrivate
{
public:
Q_DECLARE_PUBLIC(QBuffer)
@@ -82,9 +82,9 @@ struct QBufferUpdate
QByteArray data;
};
-} // namespace Qt3DRender
+} // namespace Qt3DCore
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(Qt3DRender::QBufferUpdate) // LCOV_EXCL_LINE
+Q_DECLARE_METATYPE(Qt3DCore::QBufferUpdate) // LCOV_EXCL_LINE
-#endif // QT3DRENDER_QBUFFER_P_H
+#endif // QT3DCORE_QBUFFER_P_H
diff --git a/src/render/geometry/qgeometry.cpp b/src/core/geometry/qgeometry.cpp
index b3992b0aa..008ad4b3d 100644
--- a/src/render/geometry/qgeometry.cpp
+++ b/src/core/geometry/qgeometry.cpp
@@ -41,14 +41,12 @@
#include "qgeometryfactory_p.h"
#include "qgeometry_p.h"
#include <private/qnode_p.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qattribute.h>
QT_BEGIN_NAMESPACE
using namespace Qt3DCore;
-namespace Qt3DRender {
-
QGeometryFactory::~QGeometryFactory()
{
}
@@ -79,8 +77,8 @@ void QGeometryPrivate::setExtent(const QVector3D &minExtent, const QVector3D &ma
/*!
\qmltype Geometry
- \instantiates Qt3DRender::QGeometry
- \inqmlmodule Qt3D.Render
+ \instantiates Qt3DCore::QGeometry
+ \inqmlmodule Qt3D.Core
\inherits Node
\since 5.7
\brief Encapsulates geometry.
@@ -91,14 +89,14 @@ void QGeometryPrivate::setExtent(const QVector3D &minExtent, const QVector3D &ma
*/
/*!
- \class Qt3DRender::QGeometry
- \inmodule Qt3DRender
+ \class Qt3DCore::QGeometry
+ \inmodule Qt3DCore
\since 5.7
\brief Encapsulates geometry.
- A Qt3DRender::QGeometry class is used to group a list of Qt3DRender::QAttribute
+ A Qt3DCore::QGeometry class is used to group a list of Qt3DCore::QAttribute
objects together to form a geometric shape Qt3D is able to render using
- Qt3DRender::QGeometryRenderer. Special attribute can be set in order to calculate
+ Qt3DCore::QGeometryRenderer. Special attribute can be set in order to calculate
bounding volume of the shape.
*/
@@ -128,7 +126,7 @@ void QGeometryPrivate::setExtent(const QVector3D &minExtent, const QVector3D &ma
If unspecified, the system will look for the attribute using the name returned by
QAttribute::defaultPositionAttributeName.
- \sa Qt3DRender::QAttribute
+ \sa Qt3DCore::QAttribute
*/
@@ -139,12 +137,12 @@ QGeometry::QGeometry(QNode *parent)
: QGeometry(*new QGeometryPrivate(), parent) {}
/*!
- \fn Qt3DRender::QGeometryFactory::operator()()
+ \fn Qt3DCore::QGeometryFactory::operator()()
Returns the generated geometry.
*/
/*!
- \fn bool Qt3DRender::QGeometryFactory::operator==(const QGeometryFactory &other) const = 0
+ \fn bool Qt3DCore::QGeometryFactory::operator==(const QGeometryFactory &other) const = 0
Compares the factory with the factory specified in \a other.
Returns true if they are equal.
@@ -165,7 +163,7 @@ QGeometry::QGeometry(QGeometryPrivate &dd, QNode *parent)
}
/*!
- \fn void Qt3DRender::QGeometry::addAttribute(Qt3DRender::QAttribute *attribute)
+ \fn void Qt3DCore::QGeometry::addAttribute(Qt3DCore::QAttribute *attribute)
Adds an \a attribute to this geometry.
*/
void QGeometry::addAttribute(QAttribute *attribute)
@@ -190,7 +188,7 @@ void QGeometry::addAttribute(QAttribute *attribute)
}
/*!
- \fn void Qt3DRender::QGeometry::removeAttribute(Qt3DRender::QAttribute *attribute)
+ \fn void Qt3DCore::QGeometry::removeAttribute(Qt3DCore::QAttribute *attribute)
Removes the given \a attribute from this geometry.
*/
void QGeometry::removeAttribute(QAttribute *attribute)
@@ -261,8 +259,6 @@ QVector<QAttribute *> QGeometry::attributes() const
return d->m_attributes;
}
-} // namespace Qt3DRender
-
QT_END_NAMESPACE
#include "moc_qgeometry.cpp"
diff --git a/src/render/geometry/qgeometry.h b/src/core/geometry/qgeometry.h
index 442ec7d7a..a619884a0 100644
--- a/src/render/geometry/qgeometry.h
+++ b/src/core/geometry/qgeometry.h
@@ -37,23 +37,23 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QGEOMETRY_H
-#define QT3DRENDER_QGEOMETRY_H
+#ifndef QT3DCORE_QGEOMETRY_H
+#define QT3DCORE_QGEOMETRY_H
#include <Qt3DCore/qnode.h>
-#include <Qt3DRender/qt3drender_global.h>
+#include <Qt3DCore/qt3dcore_global.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QGeometryPrivate;
-class Q_3DRENDERSHARED_EXPORT QGeometry : public Qt3DCore::QNode
+class Q_3DCORESHARED_EXPORT QGeometry : public Qt3DCore::QNode
{
Q_OBJECT
- Q_PROPERTY(Qt3DRender::QAttribute *boundingVolumePositionAttribute READ boundingVolumePositionAttribute WRITE setBoundingVolumePositionAttribute NOTIFY boundingVolumePositionAttributeChanged)
+ Q_PROPERTY(Qt3DCore::QAttribute *boundingVolumePositionAttribute READ boundingVolumePositionAttribute WRITE setBoundingVolumePositionAttribute NOTIFY boundingVolumePositionAttributeChanged)
Q_PROPERTY(QVector3D minExtent READ minExtent NOTIFY minExtentChanged REVISION 13)
Q_PROPERTY(QVector3D maxExtent READ maxExtent NOTIFY maxExtentChanged REVISION 13)
public:
@@ -61,8 +61,8 @@ public:
~QGeometry();
QVector<QAttribute *> attributes() const;
- Q_INVOKABLE void addAttribute(Qt3DRender::QAttribute *attribute);
- Q_INVOKABLE void removeAttribute(Qt3DRender::QAttribute *attribute);
+ Q_INVOKABLE void addAttribute(Qt3DCore::QAttribute *attribute);
+ Q_INVOKABLE void removeAttribute(Qt3DCore::QAttribute *attribute);
QAttribute *boundingVolumePositionAttribute() const;
QVector3D minExtent() const;
@@ -82,8 +82,8 @@ private:
Q_DECLARE_PRIVATE(QGeometry)
};
-} // namespace Qt3DRender
+} // namespace Qt3DCore
QT_END_NAMESPACE
-#endif // QT3DRENDER_QGEOMETRY_H
+#endif // QT3DCORE_QGEOMETRY_H
diff --git a/src/render/geometry/qgeometry_p.h b/src/core/geometry/qgeometry_p.h
index 2b271292d..467131fbe 100644
--- a/src/render/geometry/qgeometry_p.h
+++ b/src/core/geometry/qgeometry_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QT3D_QGEOMETRY_P_H
-#define QT3D_QGEOMETRY_P_H
+#ifndef QT3DCORE_QGEOMETRY_P_H
+#define QT3DCORE_QGEOMETRY_P_H
//
// W A R N I N G
@@ -51,15 +51,18 @@
// We mean it.
//
-#include <Qt3DRender/private/qt3drender_global_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DCore/qgeometry.h>
#include <QVector3D>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
-class Q_3DRENDERSHARED_PRIVATE_EXPORT QGeometryPrivate : public Qt3DCore::QNodePrivate
+class QAttribute;
+
+class Q_3DCORESHARED_EXPORT QGeometryPrivate : public QNodePrivate
{
public:
Q_DECLARE_PUBLIC(QGeometry)
@@ -75,9 +78,9 @@ public:
QVector3D m_maxExtent;
};
-} // namespace Qt3DRender
+} // namespace Qt3DCore
QT_END_NAMESPACE
-#endif // QT3D_QGEOMETRY_P_H
+#endif // QT3DCORE_QGEOMETRY_P_H
diff --git a/src/render/geometry/qgeometryfactory_p.h b/src/core/geometry/qgeometryfactory_p.h
index ac7900dba..47f3a5281 100644
--- a/src/render/geometry/qgeometryfactory_p.h
+++ b/src/core/geometry/qgeometryfactory_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QGEOMETRYFACTORY
-#define QT3DRENDER_QGEOMETRYFACTORY
+#ifndef QT3DCORE_QGEOMETRYFACTORY_P_H
+#define QT3DCORE_QGEOMETRYFACTORY_P_H
//
// W A R N I N G
@@ -51,17 +51,17 @@
// We mean it.
//
-#include <Qt3DRender/qt3drender_global.h>
-#include <Qt3DRender/qabstractfunctor.h>
+#include <Qt3DCore/qt3dcore_global.h>
+#include <Qt3DCore/qabstractfunctor.h>
#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QGeometry;
-class Q_3DRENDERSHARED_EXPORT QGeometryFactory : public QAbstractFunctor
+class Q_3DCORESHARED_EXPORT QGeometryFactory : public QAbstractFunctor
{
public:
virtual ~QGeometryFactory();
@@ -75,7 +75,6 @@ typedef QSharedPointer<QGeometryFactory> QGeometryFactoryPtr;
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(Qt3DRender::QGeometryFactoryPtr) // LCOV_EXCL_LINE
-
-#endif // QT3DRENDER_QGEOMETRYFACTORY
+Q_DECLARE_METATYPE(Qt3DCore::QGeometryFactoryPtr) // LCOV_EXCL_LINE
+#endif // QT3DCORE_QGEOMETRYFACTORY_P_H
diff --git a/src/render/io/qurlhelper.cpp b/src/core/qurlhelper.cpp
index f55a547fb..1660714c9 100644
--- a/src/render/io/qurlhelper.cpp
+++ b/src/core/qurlhelper.cpp
@@ -41,7 +41,7 @@
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
QString QUrlHelper::urlToLocalFileOrQrc(const QUrl &url)
{
@@ -63,6 +63,6 @@ QString QUrlHelper::urlToLocalFileOrQrc(const QUrl &url)
return url.toLocalFile();
}
-} // Qt3DRender
+} // Qt3DCore
QT_END_NAMESPACE
diff --git a/src/render/io/qurlhelper_p.h b/src/core/qurlhelper_p.h
index d816d5d31..b545ece12 100644
--- a/src/render/io/qurlhelper_p.h
+++ b/src/core/qurlhelper_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QT3DRENDER_QURLHELPER_P_H
-#define QT3DRENDER_QURLHELPER_P_H
+#ifndef QT3DCORE_QURLHELPER_P_H
+#define QT3DCORE_QURLHELPER_P_H
//
// W A R N I N G
@@ -51,21 +51,21 @@
// We mean it.
//
-#include <Qt3DRender/qt3drender_global.h>
+#include <Qt3DCore/qt3dcore_global.h>
#include <QUrl>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
-class Q_3DRENDERSHARED_EXPORT QUrlHelper
+class Q_3DCORESHARED_EXPORT QUrlHelper
{
public:
static QString urlToLocalFileOrQrc(const QUrl &url);
};
-} // Qt3DRender
+} // Qt3DCore
QT_END_NAMESPACE
-#endif // QT3DRENDER_QURLHELPER_P_H
+#endif // QT3DCORE_QURLHELPER_P_H
diff --git a/src/doc/src/qt3drender-geometry.qdoc b/src/doc/src/qt3drender-geometry.qdoc
index 905d76eef..6bfabbc76 100644
--- a/src/doc/src/qt3drender-geometry.qdoc
+++ b/src/doc/src/qt3drender-geometry.qdoc
@@ -44,8 +44,8 @@
\section2 Buffer
- The Qt3DRender::QBuffer class stores the raw data. This acts purely as an
- array of memory. In most cases a Qt3DRender::QBuffer will be used
+ The Qt3DCore::QBuffer class stores the raw data. This acts purely as an
+ array of memory. In most cases a Qt3DCore::QBuffer will be used
indirectly by being referenced by one or more Qt3DRender::QAttributes.
However there are times when a QBuffer may be used directly as the value
property of a QParameter when dealing with Uniform Buffer Objects (UBO) or
@@ -61,9 +61,9 @@
\section2 Attribute
- Qt3DRender::QAttribute specifies how data contained in the referenced
+ Qt3DCore::QAttribute specifies how data contained in the referenced
buffer should be extracted and passed to an input of a vertex shader. It
- references a Qt3DRender::QBuffer and can specify the layout of the
+ references a Qt3DCore::QBuffer and can specify the layout of the
attributes by definining the vertex size, the data type, the stride between
two vertices and a starting offset. The type of the attribute will also
define whether it is to be used as a vertex buffer or as an index buffer.
@@ -87,7 +87,7 @@
\section2 Geometry
- A Qt3DRender::QGeometry aggregates various attributes to form a piece of
+ A Qt3DCore::QGeometry aggregates various attributes to form a piece of
geometry. Usually a proper geometry will provide an attribute for vertex
positions, an attribute for vertex normals and an attribute for texture
coordinates. If you want your geometry to also work with normal mapped
@@ -122,7 +122,7 @@
\section2 GeometryRenderer
Qt3DRender::QGeometryRenderer is a QComponent which when aggregated by a
- QEntity allows to draw the Qt3DRender::QGeometry it references. It provides
+ QEntity allows to draw the Qt3DCore::QGeometry it references. It provides
properties to control the draw call such as the number of instances to be
drawn, the starting instance, the type of
Qt3DRender::QGeometryRenderer::PrimitiveType to be used, etc. A
diff --git a/src/extras/3dtext/qextrudedtextgeometry.cpp b/src/extras/3dtext/qextrudedtextgeometry.cpp
index 3c4580c65..67f3b21ce 100644
--- a/src/extras/3dtext/qextrudedtextgeometry.cpp
+++ b/src/extras/3dtext/qextrudedtextgeometry.cpp
@@ -50,8 +50,8 @@
#include "qextrudedtextgeometry.h"
#include "qextrudedtextgeometry_p.h"
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
#include <private/qtriangulator_p.h>
#include <qmath.h>
#include <QVector3D>
@@ -162,35 +162,35 @@ QExtrudedTextGeometryPrivate::QExtrudedTextGeometryPrivate()
void QExtrudedTextGeometryPrivate::init()
{
Q_Q(QExtrudedTextGeometry);
- m_positionAttribute = new Qt3DRender::QAttribute(q);
- m_normalAttribute = new Qt3DRender::QAttribute(q);
- m_indexAttribute = new Qt3DRender::QAttribute(q);
- m_vertexBuffer = new Qt3DRender::QBuffer(q);
- m_indexBuffer = new Qt3DRender::QBuffer(q);
+ m_positionAttribute = new Qt3DCore::QAttribute(q);
+ m_normalAttribute = new Qt3DCore::QAttribute(q);
+ m_indexAttribute = new Qt3DCore::QAttribute(q);
+ m_vertexBuffer = new Qt3DCore::QBuffer(q);
+ m_indexBuffer = new Qt3DCore::QBuffer(q);
const quint32 elementSize = 3 + 3;
const quint32 stride = elementSize * sizeof(float);
- m_positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- m_positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ m_positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ m_positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
m_positionAttribute->setVertexSize(3);
- m_positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ m_positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
m_positionAttribute->setBuffer(m_vertexBuffer);
m_positionAttribute->setByteStride(stride);
m_positionAttribute->setByteOffset(0);
m_positionAttribute->setCount(0);
- m_normalAttribute->setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
- m_normalAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ m_normalAttribute->setName(Qt3DCore::QAttribute::defaultNormalAttributeName());
+ m_normalAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
m_normalAttribute->setVertexSize(3);
- m_normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ m_normalAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
m_normalAttribute->setBuffer(m_vertexBuffer);
m_normalAttribute->setByteStride(stride);
m_normalAttribute->setByteOffset(3 * sizeof(float));
m_normalAttribute->setCount(0);
- m_indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
- m_indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ m_indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
+ m_indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
m_indexAttribute->setBuffer(m_indexBuffer);
m_indexAttribute->setCount(0);
@@ -255,7 +255,7 @@ void QExtrudedTextGeometryPrivate::init()
* in 3D space.
* \since 5.9
* \ingroup geometries
- * \inherits Qt3DRender::QGeometry
+ * \inherits Qt3DCore::QGeometry
*
* The QExtrudedTextGeometry class is most commonly used internally by the QText3DMesh
* but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
@@ -469,7 +469,7 @@ float QExtrudedTextGeometry::extrusionLength() const
*
* Holds the geometry position attribute.
*/
-Qt3DRender::QAttribute *QExtrudedTextGeometry::positionAttribute() const
+Qt3DCore::QAttribute *QExtrudedTextGeometry::positionAttribute() const
{
Q_D(const QExtrudedTextGeometry);
return d->m_positionAttribute;
@@ -480,7 +480,7 @@ Qt3DRender::QAttribute *QExtrudedTextGeometry::positionAttribute() const
*
* Holds the geometry normal attribute.
*/
-Qt3DRender::QAttribute *QExtrudedTextGeometry::normalAttribute() const
+Qt3DCore::QAttribute *QExtrudedTextGeometry::normalAttribute() const
{
Q_D(const QExtrudedTextGeometry);
return d->m_normalAttribute;
@@ -491,7 +491,7 @@ Qt3DRender::QAttribute *QExtrudedTextGeometry::normalAttribute() const
*
* Holds the geometry index attribute.
*/
-Qt3DRender::QAttribute *QExtrudedTextGeometry::indexAttribute() const
+Qt3DCore::QAttribute *QExtrudedTextGeometry::indexAttribute() const
{
Q_D(const QExtrudedTextGeometry);
return d->m_indexAttribute;
diff --git a/src/extras/3dtext/qextrudedtextgeometry.h b/src/extras/3dtext/qextrudedtextgeometry.h
index d40797c6f..0a92932af 100644
--- a/src/extras/3dtext/qextrudedtextgeometry.h
+++ b/src/extras/3dtext/qextrudedtextgeometry.h
@@ -52,39 +52,39 @@
#define QT3DEXTRAS_QEXTRUDEDTEXTGEOMETRY_H
#include <Qt3DExtras/qt3dextras_global.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include <QtCore/QString>
#include <QtGui/QFont>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
-} // namespace Qt3DRender
+} // namespace Qt3DCore
namespace Qt3DExtras {
class QExtrudedTextGeometryPrivate;
-class Q_3DEXTRASSHARED_EXPORT QExtrudedTextGeometry : public Qt3DRender::QGeometry
+class Q_3DEXTRASSHARED_EXPORT QExtrudedTextGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
Q_PROPERTY(float extrusionLength READ extrusionLength WRITE setDepth NOTIFY depthChanged)
- Q_PROPERTY(Qt3DRender::QAttribute *positionAttribute READ positionAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *normalAttribute READ normalAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
explicit QExtrudedTextGeometry(Qt3DCore::QNode *parent = nullptr);
~QExtrudedTextGeometry();
- Qt3DRender::QAttribute *positionAttribute() const;
- Qt3DRender::QAttribute *normalAttribute() const;
- Qt3DRender::QAttribute *indexAttribute() const;
+ Qt3DCore::QAttribute *positionAttribute() const;
+ Qt3DCore::QAttribute *normalAttribute() const;
+ Qt3DCore::QAttribute *indexAttribute() const;
QString text() const;
QFont font() const;
float extrusionLength() const;
diff --git a/src/extras/3dtext/qextrudedtextgeometry_p.h b/src/extras/3dtext/qextrudedtextgeometry_p.h
index 0bfa45e17..22b9e39ea 100644
--- a/src/extras/3dtext/qextrudedtextgeometry_p.h
+++ b/src/extras/3dtext/qextrudedtextgeometry_p.h
@@ -62,23 +62,24 @@
// We mean it.
//
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DExtras/qextrudedtextgeometry.h>
#include <QFont>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QBuffer;
-} // namespace Qt3DRender
+} // namespace Qt3DCore
namespace Qt3DExtras {
class QExtrudedTextGeometry;
-class QExtrudedTextGeometryPrivate : public Qt3DRender::QGeometryPrivate
+class QExtrudedTextGeometryPrivate : public Qt3DCore::QGeometryPrivate
{
public:
QExtrudedTextGeometryPrivate();
@@ -90,11 +91,11 @@ public:
float m_depth;
float m_edgeSplitAngle;
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QAttribute *m_normalAttribute;
- Qt3DRender::QAttribute *m_indexAttribute;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QAttribute *m_normalAttribute;
+ Qt3DCore::QAttribute *m_indexAttribute;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
Q_DECLARE_PUBLIC(QExtrudedTextGeometry)
};
diff --git a/src/extras/geometries/qconegeometry.cpp b/src/extras/geometries/qconegeometry.cpp
index af9941394..e2165e6f8 100644
--- a/src/extras/geometries/qconegeometry.cpp
+++ b/src/extras/geometries/qconegeometry.cpp
@@ -45,7 +45,7 @@
* \brief The QConeGeometry class allows creation of a cone in 3D space.
* \since 5.7
* \ingroup geometries
- * \inherits Qt3DRender::QGeometry
+ * \inherits Qt3DCore::QGeometry
*
* The QConeGeometry class is most commonly used internally by the QConeMesh
* but can also be used in custom Qt3DRender::QGeometryRenderer subclasses. The class
@@ -59,15 +59,15 @@
#include "qconegeometry.h"
#include "qconegeometry_p.h"
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <QtGui/QVector3D>
#include <cmath>
QT_BEGIN_NAMESPACE
-using namespace Qt3DRender;
+using namespace Qt3DCore;
namespace Qt3DExtras {
@@ -249,8 +249,8 @@ void QConeGeometryPrivate::init()
m_normalAttribute = new QAttribute(q);
m_texCoordAttribute = new QAttribute(q);
m_indexAttribute = new QAttribute(q);
- m_vertexBuffer = new Qt3DRender::QBuffer(q);
- m_indexBuffer = new Qt3DRender::QBuffer(q);
+ m_vertexBuffer = new Qt3DCore::QBuffer(q);
+ m_indexBuffer = new Qt3DCore::QBuffer(q);
// vec3 pos, vec2 tex, vec3 normal
const quint32 elementSize = 3 + 2 + 3;
diff --git a/src/extras/geometries/qconegeometry.h b/src/extras/geometries/qconegeometry.h
index 2deb56f0e..cff40576e 100644
--- a/src/extras/geometries/qconegeometry.h
+++ b/src/extras/geometries/qconegeometry.h
@@ -41,11 +41,11 @@
#define QT3DEXTRAS_QCONEGEOMETRY_H
#include <Qt3DExtras/qt3dextras_global.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
} // Render
@@ -53,7 +53,7 @@ namespace Qt3DExtras {
class QConeGeometryPrivate;
-class Q_3DEXTRASSHARED_EXPORT QConeGeometry : public Qt3DRender::QGeometry
+class Q_3DEXTRASSHARED_EXPORT QConeGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
Q_PROPERTY( bool hasTopEndcap READ hasTopEndcap WRITE setHasTopEndcap NOTIFY hasTopEndcapChanged )
@@ -63,10 +63,10 @@ class Q_3DEXTRASSHARED_EXPORT QConeGeometry : public Qt3DRender::QGeometry
Q_PROPERTY( float topRadius READ topRadius WRITE setTopRadius NOTIFY topRadiusChanged )
Q_PROPERTY( float bottomRadius READ bottomRadius WRITE setBottomRadius NOTIFY bottomRadiusChanged )
Q_PROPERTY(float length READ length WRITE setLength NOTIFY lengthChanged)
- Q_PROPERTY(Qt3DRender::QAttribute *positionAttribute READ positionAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *normalAttribute READ normalAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
explicit QConeGeometry(QNode *parent = nullptr);
@@ -83,10 +83,10 @@ public:
int slices() const;
float length() const;
- Qt3DRender::QAttribute *positionAttribute() const;
- Qt3DRender::QAttribute *normalAttribute() const;
- Qt3DRender::QAttribute *texCoordAttribute() const;
- Qt3DRender::QAttribute *indexAttribute() const;
+ Qt3DCore::QAttribute *positionAttribute() const;
+ Qt3DCore::QAttribute *normalAttribute() const;
+ Qt3DCore::QAttribute *texCoordAttribute() const;
+ Qt3DCore::QAttribute *indexAttribute() const;
public Q_SLOTS:
void setHasTopEndcap( bool hasTopEndcap );
diff --git a/src/extras/geometries/qconegeometry_p.h b/src/extras/geometries/qconegeometry_p.h
index 39c3913fc..a87aa41c6 100644
--- a/src/extras/geometries/qconegeometry_p.h
+++ b/src/extras/geometries/qconegeometry_p.h
@@ -51,20 +51,20 @@
// We mean it.
//
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QBuffer;
-} // namespace Qt3DRender
+} // namespace Qt3DCore
namespace Qt3DExtras {
-class QConeGeometryPrivate : public Qt3DRender::QGeometryPrivate
+class QConeGeometryPrivate : public Qt3DCore::QGeometryPrivate
{
public:
QConeGeometryPrivate();
@@ -80,13 +80,13 @@ public:
float m_topRadius;
float m_bottomRadius;
float m_length;
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QAttribute *m_normalAttribute;
- Qt3DRender::QAttribute *m_texCoordAttribute;
- Qt3DRender::QAttribute *m_indexAttribute;
- Qt3DRender::QBuffer *m_positionBuffer;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QAttribute *m_normalAttribute;
+ Qt3DCore::QAttribute *m_texCoordAttribute;
+ Qt3DCore::QAttribute *m_indexAttribute;
+ Qt3DCore::QBuffer *m_positionBuffer;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
QByteArray generateVertexData() const;
QByteArray generateIndexData() const;
diff --git a/src/extras/geometries/qconemesh.cpp b/src/extras/geometries/qconemesh.cpp
index d54e43e1f..508e7cfd3 100644
--- a/src/extras/geometries/qconemesh.cpp
+++ b/src/extras/geometries/qconemesh.cpp
@@ -44,8 +44,8 @@
#include "qconegeometry.h"
#include <Qt3DExtras/qconemesh.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
#include <QtGui/QVector3D>
#include <qmath.h>
diff --git a/src/extras/geometries/qconemesh.h b/src/extras/geometries/qconemesh.h
index 6c0408b7b..57fe0c0fc 100644
--- a/src/extras/geometries/qconemesh.h
+++ b/src/extras/geometries/qconemesh.h
@@ -97,7 +97,7 @@ private:
void setFirstInstance(int firstInstance);
void setRestartIndexValue(int index);
void setPrimitiveRestartEnabled(bool enabled);
- void setGeometry(Qt3DRender::QGeometry *geometry);
+ void setGeometry(Qt3DCore::QGeometry *geometry);
void setPrimitiveType(PrimitiveType primitiveType);
};
diff --git a/src/extras/geometries/qcuboidgeometry.cpp b/src/extras/geometries/qcuboidgeometry.cpp
index 1f86defb4..87707eefd 100644
--- a/src/extras/geometries/qcuboidgeometry.cpp
+++ b/src/extras/geometries/qcuboidgeometry.cpp
@@ -40,16 +40,16 @@
#include "qcuboidgeometry.h"
#include "qcuboidgeometry_p.h"
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/private/renderlogging_p.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/private/corelogging_p.h>
#include <limits>
QT_BEGIN_NAMESPACE
-using namespace Qt3DRender;
+using namespace Qt3DCore;
namespace Qt3DExtras {
@@ -406,13 +406,13 @@ QCuboidGeometryPrivate::QCuboidGeometryPrivate()
void QCuboidGeometryPrivate::init()
{
Q_Q(QCuboidGeometry);
- m_positionAttribute = new Qt3DRender::QAttribute(q);
- m_normalAttribute = new Qt3DRender::QAttribute(q);
- m_texCoordAttribute = new Qt3DRender::QAttribute(q);
- m_tangentAttribute = new Qt3DRender::QAttribute(q);
- m_indexAttribute = new Qt3DRender::QAttribute(q);
- m_vertexBuffer = new Qt3DRender::QBuffer(q);
- m_indexBuffer = new Qt3DRender::QBuffer(q);
+ m_positionAttribute = new Qt3DCore::QAttribute(q);
+ m_normalAttribute = new Qt3DCore::QAttribute(q);
+ m_texCoordAttribute = new Qt3DCore::QAttribute(q);
+ m_tangentAttribute = new Qt3DCore::QAttribute(q);
+ m_indexAttribute = new Qt3DCore::QAttribute(q);
+ m_vertexBuffer = new Qt3DCore::QBuffer(q);
+ m_indexBuffer = new Qt3DCore::QBuffer(q);
// vec3 pos vec2 tex vec3 normal vec4 tangent
const quint32 stride = (3 + 2 + 3 + 4) * sizeof(float);
@@ -578,7 +578,7 @@ QByteArray QCuboidGeometryPrivate::generateIndexData() const
* \brief The QCuboidGeometry class allows creation of a cuboid in 3D space.
* \since 5.7
* \ingroup geometries
- * \inherits Qt3DRender::QGeometry
+ * \inherits Qt3DCore::QGeometry
*
* The QCuboidGeometry class is most commonly used internally by the QCuboidMesh
* but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
diff --git a/src/extras/geometries/qcuboidgeometry.h b/src/extras/geometries/qcuboidgeometry.h
index 50bb10930..1234c65be 100644
--- a/src/extras/geometries/qcuboidgeometry.h
+++ b/src/extras/geometries/qcuboidgeometry.h
@@ -41,22 +41,22 @@
#define QT3DEXTRAS_QCUBOIDGEOMETRY_H
#include <Qt3DExtras/qt3dextras_global.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include <QtCore/QSize>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
class QCuboidGeometryPrivate;
-class Q_3DEXTRASSHARED_EXPORT QCuboidGeometry : public Qt3DRender::QGeometry
+class Q_3DEXTRASSHARED_EXPORT QCuboidGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
Q_PROPERTY(float xExtent READ xExtent WRITE setXExtent NOTIFY xExtentChanged)
@@ -65,11 +65,11 @@ class Q_3DEXTRASSHARED_EXPORT QCuboidGeometry : public Qt3DRender::QGeometry
Q_PROPERTY(QSize xyMeshResolution READ xyMeshResolution WRITE setXYMeshResolution NOTIFY xyMeshResolutionChanged)
Q_PROPERTY(QSize yzMeshResolution READ yzMeshResolution WRITE setYZMeshResolution NOTIFY yzMeshResolutionChanged)
Q_PROPERTY(QSize xzMeshResolution READ xzMeshResolution WRITE setXZMeshResolution NOTIFY xzMeshResolutionChanged)
- Q_PROPERTY(Qt3DRender::QAttribute *positionAttribute READ positionAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *normalAttribute READ normalAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *tangentAttribute READ tangentAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *tangentAttribute READ tangentAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
explicit QCuboidGeometry(QNode *parent = nullptr);
@@ -85,11 +85,11 @@ public:
QSize xyMeshResolution() const;
QSize xzMeshResolution() const;
- Qt3DRender::QAttribute *positionAttribute() const;
- Qt3DRender::QAttribute *normalAttribute() const;
- Qt3DRender::QAttribute *texCoordAttribute() const;
- Qt3DRender::QAttribute *tangentAttribute() const;
- Qt3DRender::QAttribute *indexAttribute() const;
+ Qt3DCore::QAttribute *positionAttribute() const;
+ Qt3DCore::QAttribute *normalAttribute() const;
+ Qt3DCore::QAttribute *texCoordAttribute() const;
+ Qt3DCore::QAttribute *tangentAttribute() const;
+ Qt3DCore::QAttribute *indexAttribute() const;
public Q_SLOTS:
void setXExtent(float xExtent);
diff --git a/src/extras/geometries/qcuboidgeometry_p.h b/src/extras/geometries/qcuboidgeometry_p.h
index 2c0ea5524..399ea5876 100644
--- a/src/extras/geometries/qcuboidgeometry_p.h
+++ b/src/extras/geometries/qcuboidgeometry_p.h
@@ -53,20 +53,21 @@
#include <QtCore/QSize>
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DExtras/qcuboidgeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QBuffer;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
-class QCuboidGeometryPrivate : public Qt3DRender::QGeometryPrivate
+class QCuboidGeometryPrivate : public Qt3DCore::QGeometryPrivate
{
public:
QCuboidGeometryPrivate();
@@ -82,13 +83,13 @@ public:
QSize m_xzFaceResolution;
QSize m_xyFaceResolution;
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QAttribute *m_normalAttribute;
- Qt3DRender::QAttribute *m_texCoordAttribute;
- Qt3DRender::QAttribute *m_tangentAttribute;
- Qt3DRender::QAttribute *m_indexAttribute;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QAttribute *m_normalAttribute;
+ Qt3DCore::QAttribute *m_texCoordAttribute;
+ Qt3DCore::QAttribute *m_tangentAttribute;
+ Qt3DCore::QAttribute *m_indexAttribute;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
Q_DECLARE_PUBLIC(QCuboidGeometry)
diff --git a/src/extras/geometries/qcuboidmesh.h b/src/extras/geometries/qcuboidmesh.h
index dc7f821ff..a945dbe2b 100644
--- a/src/extras/geometries/qcuboidmesh.h
+++ b/src/extras/geometries/qcuboidmesh.h
@@ -97,7 +97,7 @@ private:
void setFirstInstance(int firstInstance);
void setRestartIndexValue(int index);
void setPrimitiveRestartEnabled(bool enabled);
- void setGeometry(Qt3DRender::QGeometry *geometry);
+ void setGeometry(Qt3DCore::QGeometry *geometry);
void setPrimitiveType(PrimitiveType primitiveType);
};
diff --git a/src/extras/geometries/qcylindergeometry.cpp b/src/extras/geometries/qcylindergeometry.cpp
index a6bdc5f8d..5d37b5ac8 100644
--- a/src/extras/geometries/qcylindergeometry.cpp
+++ b/src/extras/geometries/qcylindergeometry.cpp
@@ -44,8 +44,8 @@
#include "qcylindergeometry.h"
#include "qcylindergeometry_p.h"
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
#include <QtGui/QVector3D>
#include <qmath.h>
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
-using namespace Qt3DRender;
+using namespace Qt3DCore;
namespace Qt3DExtras {
@@ -202,8 +202,8 @@ void QCylinderGeometryPrivate::init()
m_normalAttribute = new QAttribute(q);
m_texCoordAttribute = new QAttribute(q);
m_indexAttribute = new QAttribute(q);
- m_vertexBuffer = new Qt3DRender::QBuffer(q);
- m_indexBuffer = new Qt3DRender::QBuffer(q);
+ m_vertexBuffer = new Qt3DCore::QBuffer(q);
+ m_indexBuffer = new Qt3DCore::QBuffer(q);
// vec3 pos, vec2 tex, vec3 normal
const quint32 elementSize = 3 + 2 + 3;
@@ -354,7 +354,7 @@ QByteArray QCylinderGeometryPrivate::generateIndexData() const
* \brief The QCylinderGeometry class allows creation of a cylinder in 3D space.
* \since 5.7
* \ingroup geometries
- * \inherits Qt3DRender::QGeometry
+ * \inherits Qt3DCore::QGeometry
*
* The QCylinderGeometry class is most commonly used internally by the QCylinderMesh
* but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
diff --git a/src/extras/geometries/qcylindergeometry.h b/src/extras/geometries/qcylindergeometry.h
index 0a9022016..4151aadb2 100644
--- a/src/extras/geometries/qcylindergeometry.h
+++ b/src/extras/geometries/qcylindergeometry.h
@@ -41,30 +41,30 @@
#define QT3DEXTRAS_QCYLINDERGEOMETRY_H
#include <Qt3DExtras/qt3dextras_global.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
-} // namespace Qt3DRender
+} // namespace Qt3DCore
namespace Qt3DExtras {
class QCylinderGeometryPrivate;
-class Q_3DEXTRASSHARED_EXPORT QCylinderGeometry : public Qt3DRender::QGeometry
+class Q_3DEXTRASSHARED_EXPORT QCylinderGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged)
Q_PROPERTY(int slices READ slices WRITE setSlices NOTIFY slicesChanged)
Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged)
Q_PROPERTY(float length READ length WRITE setLength NOTIFY lengthChanged)
- Q_PROPERTY(Qt3DRender::QAttribute *positionAttribute READ positionAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *normalAttribute READ normalAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
explicit QCylinderGeometry(QNode *parent = nullptr);
@@ -78,10 +78,10 @@ public:
float radius() const;
float length() const;
- Qt3DRender::QAttribute *positionAttribute() const;
- Qt3DRender::QAttribute *normalAttribute() const;
- Qt3DRender::QAttribute *texCoordAttribute() const;
- Qt3DRender::QAttribute *indexAttribute() const;
+ Qt3DCore::QAttribute *positionAttribute() const;
+ Qt3DCore::QAttribute *normalAttribute() const;
+ Qt3DCore::QAttribute *texCoordAttribute() const;
+ Qt3DCore::QAttribute *indexAttribute() const;
public Q_SLOTS:
void setRings(int rings);
diff --git a/src/extras/geometries/qcylindergeometry_p.h b/src/extras/geometries/qcylindergeometry_p.h
index d88c34874..4803322e1 100644
--- a/src/extras/geometries/qcylindergeometry_p.h
+++ b/src/extras/geometries/qcylindergeometry_p.h
@@ -51,20 +51,21 @@
// We mean it.
//
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DExtras/qcylindergeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QBuffer;
-} // namespace Qt3DRender
+} // namespace Qt3DCore
namespace Qt3DExtras {
-class QCylinderGeometryPrivate : public Qt3DRender::QGeometryPrivate
+class QCylinderGeometryPrivate : public Qt3DCore::QGeometryPrivate
{
public:
QCylinderGeometryPrivate();
@@ -77,12 +78,12 @@ public:
int m_slices;
float m_radius;
float m_length;
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QAttribute *m_normalAttribute;
- Qt3DRender::QAttribute *m_texCoordAttribute;
- Qt3DRender::QAttribute *m_indexAttribute;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QAttribute *m_normalAttribute;
+ Qt3DCore::QAttribute *m_texCoordAttribute;
+ Qt3DCore::QAttribute *m_indexAttribute;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
QByteArray generateVertexData() const;
QByteArray generateIndexData() const;
diff --git a/src/extras/geometries/qcylindermesh.cpp b/src/extras/geometries/qcylindermesh.cpp
index 48e114cd4..3a495cce2 100644
--- a/src/extras/geometries/qcylindermesh.cpp
+++ b/src/extras/geometries/qcylindermesh.cpp
@@ -45,14 +45,15 @@
#include "qcylindermesh.h"
#include <Qt3DExtras/qcylindergeometry.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
#include <QtGui/QVector3D>
#include <qmath.h>
QT_BEGIN_NAMESPACE
+using namespace Qt3DCore;
using namespace Qt3DRender;
namespace Qt3DExtras {
diff --git a/src/extras/geometries/qcylindermesh.h b/src/extras/geometries/qcylindermesh.h
index 19ef5d2cf..f2c8fb01b 100644
--- a/src/extras/geometries/qcylindermesh.h
+++ b/src/extras/geometries/qcylindermesh.h
@@ -86,11 +86,11 @@ private:
void setFirstInstance(int firstInstance);
void setRestartIndexValue(int index);
void setPrimitiveRestartEnabled(bool enabled);
- void setGeometry(Qt3DRender::QGeometry *geometry);
+ void setGeometry(Qt3DCore::QGeometry *geometry);
void setPrimitiveType(PrimitiveType primitiveType);
};
-} // namespace Qt3DRender
+} // namespace Qt3DExtras
QT_END_NAMESPACE
diff --git a/src/extras/geometries/qplanegeometry.cpp b/src/extras/geometries/qplanegeometry.cpp
index a7ba3d56a..e83548ad5 100644
--- a/src/extras/geometries/qplanegeometry.cpp
+++ b/src/extras/geometries/qplanegeometry.cpp
@@ -40,14 +40,14 @@
#include "qplanegeometry.h"
#include "qplanegeometry_p.h"
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <limits>
QT_BEGIN_NAMESPACE
-using namespace Qt3DRender;
+using namespace Qt3DCore;
namespace Qt3DExtras {
@@ -445,8 +445,8 @@ void QPlaneGeometryPrivate::init()
m_texCoordAttribute = new QAttribute(q);
m_tangentAttribute = new QAttribute(q);
m_indexAttribute = new QAttribute(q);
- m_vertexBuffer = new Qt3DRender::QBuffer(q);
- m_indexBuffer = new Qt3DRender::QBuffer(q);
+ m_vertexBuffer = new Qt3DCore::QBuffer(q);
+ m_indexBuffer = new Qt3DCore::QBuffer(q);
const int nVerts = m_meshResolution.width() * m_meshResolution.height();
const int stride = (3 + 2 + 3 + 4) * sizeof(float);
diff --git a/src/extras/geometries/qplanegeometry.h b/src/extras/geometries/qplanegeometry.h
index 91e985700..9cd51abea 100644
--- a/src/extras/geometries/qplanegeometry.h
+++ b/src/extras/geometries/qplanegeometry.h
@@ -41,33 +41,33 @@
#define QT3DEXTRAS_QPLANEGEOMETRY_H
#include <Qt3DExtras/qt3dextras_global.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include <QtCore/QSize>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
class QPlaneGeometryPrivate;
-class Q_3DEXTRASSHARED_EXPORT QPlaneGeometry : public Qt3DRender::QGeometry
+class Q_3DEXTRASSHARED_EXPORT QPlaneGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
Q_PROPERTY(float width READ width WRITE setWidth NOTIFY widthChanged)
Q_PROPERTY(float height READ height WRITE setHeight NOTIFY heightChanged)
Q_PROPERTY(QSize resolution READ resolution WRITE setResolution NOTIFY resolutionChanged)
Q_PROPERTY(bool mirrored READ mirrored WRITE setMirrored NOTIFY mirroredChanged REVISION 9)
- Q_PROPERTY(Qt3DRender::QAttribute *positionAttribute READ positionAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *normalAttribute READ normalAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *tangentAttribute READ tangentAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *tangentAttribute READ tangentAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
explicit QPlaneGeometry(QNode *parent = nullptr);
@@ -81,11 +81,11 @@ public:
float height() const;
bool mirrored() const;
- Qt3DRender::QAttribute *positionAttribute() const;
- Qt3DRender::QAttribute *normalAttribute() const;
- Qt3DRender::QAttribute *texCoordAttribute() const;
- Qt3DRender::QAttribute *tangentAttribute() const;
- Qt3DRender::QAttribute *indexAttribute() const;
+ Qt3DCore::QAttribute *positionAttribute() const;
+ Qt3DCore::QAttribute *normalAttribute() const;
+ Qt3DCore::QAttribute *texCoordAttribute() const;
+ Qt3DCore::QAttribute *tangentAttribute() const;
+ Qt3DCore::QAttribute *indexAttribute() const;
public Q_SLOTS:
void setResolution(const QSize &resolution);
diff --git a/src/extras/geometries/qplanegeometry_p.h b/src/extras/geometries/qplanegeometry_p.h
index b1f63f277..4e87a3781 100644
--- a/src/extras/geometries/qplanegeometry_p.h
+++ b/src/extras/geometries/qplanegeometry_p.h
@@ -53,20 +53,21 @@
#include <QtCore/QSize>
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DExtras/qplanegeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QBuffer;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
-class QPlaneGeometryPrivate : public Qt3DRender::QGeometryPrivate
+class QPlaneGeometryPrivate : public Qt3DCore::QGeometryPrivate
{
public:
QPlaneGeometryPrivate();
@@ -76,13 +77,13 @@ public:
float m_height;
QSize m_meshResolution;
bool m_mirrored;
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QAttribute *m_normalAttribute;
- Qt3DRender::QAttribute *m_texCoordAttribute;
- Qt3DRender::QAttribute *m_tangentAttribute;
- Qt3DRender::QAttribute *m_indexAttribute;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QAttribute *m_normalAttribute;
+ Qt3DCore::QAttribute *m_texCoordAttribute;
+ Qt3DCore::QAttribute *m_tangentAttribute;
+ Qt3DCore::QAttribute *m_indexAttribute;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
Q_DECLARE_PUBLIC(QPlaneGeometry)
diff --git a/src/extras/geometries/qplanemesh.h b/src/extras/geometries/qplanemesh.h
index eebea1dbf..923af8897 100644
--- a/src/extras/geometries/qplanemesh.h
+++ b/src/extras/geometries/qplanemesh.h
@@ -87,11 +87,11 @@ private:
void setFirstInstance(int firstInstance);
void setRestartIndexValue(int index);
void setPrimitiveRestartEnabled(bool enabled);
- void setGeometry(Qt3DRender::QGeometry *geometry);
+ void setGeometry(Qt3DCore::QGeometry *geometry);
void setPrimitiveType(PrimitiveType primitiveType);
};
-} // namespace Qt3DRender
+} // namespace Qt3DExtras
QT_END_NAMESPACE
diff --git a/src/extras/geometries/qspheregeometry.cpp b/src/extras/geometries/qspheregeometry.cpp
index ab84b5ff0..c780ba83c 100644
--- a/src/extras/geometries/qspheregeometry.cpp
+++ b/src/extras/geometries/qspheregeometry.cpp
@@ -40,8 +40,8 @@
#include "qspheregeometry.h"
#include "qspheregeometry_p.h"
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
#include <qmath.h>
@@ -52,7 +52,7 @@
QT_BEGIN_NAMESPACE
-using namespace Qt3DRender;
+using namespace Qt3DCore;
namespace Qt3DExtras {
@@ -190,8 +190,8 @@ void QSphereGeometryPrivate::init()
m_texCoordAttribute = new QAttribute(q);
m_tangentAttribute = new QAttribute(q);
m_indexAttribute = new QAttribute(q);
- m_vertexBuffer = new Qt3DRender::QBuffer(q);
- m_indexBuffer = new Qt3DRender::QBuffer(q);
+ m_vertexBuffer = new Qt3DCore::QBuffer(q);
+ m_indexBuffer = new Qt3DCore::QBuffer(q);
// vec3 pos, vec2 tex, vec3 normal, vec4 tangent
const quint32 elementSize = 3 + 2 + 3 + 4;
@@ -334,7 +334,7 @@ QByteArray QSphereGeometryPrivate::generateIndexData() const
* \brief The QSphereGeometry class allows creation of a sphere in 3D space.
* \since 5.7
* \ingroup geometries
- * \inherits Qt3DRender::QGeometry
+ * \inherits Qt3DCore::QGeometry
*
* The QSphereGeometry class is most commonly used internally by the QSphereMesh
* but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
diff --git a/src/extras/geometries/qspheregeometry.h b/src/extras/geometries/qspheregeometry.h
index 8bd8c9c94..8f42e4a31 100644
--- a/src/extras/geometries/qspheregeometry.h
+++ b/src/extras/geometries/qspheregeometry.h
@@ -40,33 +40,33 @@
#ifndef QT3DEXTRAS_QSPHEREGEOMETRY_H
#define QT3DEXTRAS_QSPHEREGEOMETRY_H
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DExtras/qt3dextras_global.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
class QSphereGeometryPrivate;
-class Q_3DEXTRASSHARED_EXPORT QSphereGeometry : public Qt3DRender::QGeometry
+class Q_3DEXTRASSHARED_EXPORT QSphereGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged)
Q_PROPERTY(int slices READ slices WRITE setSlices NOTIFY slicesChanged)
Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged)
Q_PROPERTY(bool generateTangents READ generateTangents WRITE setGenerateTangents NOTIFY generateTangentsChanged)
- Q_PROPERTY(Qt3DRender::QAttribute *positionAttribute READ positionAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *normalAttribute READ normalAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *tangentAttribute READ tangentAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *tangentAttribute READ tangentAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
explicit QSphereGeometry(QNode *parent = nullptr);
@@ -80,11 +80,11 @@ public:
int slices() const;
float radius() const;
- Qt3DRender::QAttribute *positionAttribute() const;
- Qt3DRender::QAttribute *normalAttribute() const;
- Qt3DRender::QAttribute *texCoordAttribute() const;
- Qt3DRender::QAttribute *tangentAttribute() const;
- Qt3DRender::QAttribute *indexAttribute() const;
+ Qt3DCore::QAttribute *positionAttribute() const;
+ Qt3DCore::QAttribute *normalAttribute() const;
+ Qt3DCore::QAttribute *texCoordAttribute() const;
+ Qt3DCore::QAttribute *tangentAttribute() const;
+ Qt3DCore::QAttribute *indexAttribute() const;
public Q_SLOTS:
void setRings(int rings);
diff --git a/src/extras/geometries/qspheregeometry_p.h b/src/extras/geometries/qspheregeometry_p.h
index 2dc83495e..cf31e17c6 100644
--- a/src/extras/geometries/qspheregeometry_p.h
+++ b/src/extras/geometries/qspheregeometry_p.h
@@ -51,20 +51,21 @@
// We mean it.
//
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DExtras/qspheregeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QBuffer;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
-class QSphereGeometryPrivate : public Qt3DRender::QGeometryPrivate
+class QSphereGeometryPrivate : public Qt3DCore::QGeometryPrivate
{
public:
QSphereGeometryPrivate();
@@ -74,15 +75,15 @@ public:
int m_rings;
int m_slices;
float m_radius;
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QAttribute *m_normalAttribute;
- Qt3DRender::QAttribute *m_texCoordAttribute;
- Qt3DRender::QAttribute *m_tangentAttribute;
- Qt3DRender::QAttribute *m_indexAttribute;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
-
- Q_DECLARE_PUBLIC(QSphereGeometry);
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QAttribute *m_normalAttribute;
+ Qt3DCore::QAttribute *m_texCoordAttribute;
+ Qt3DCore::QAttribute *m_tangentAttribute;
+ Qt3DCore::QAttribute *m_indexAttribute;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
+
+ Q_DECLARE_PUBLIC(QSphereGeometry)
QByteArray generateVertexData() const;
QByteArray generateIndexData() const;
diff --git a/src/extras/geometries/qspheremesh.h b/src/extras/geometries/qspheremesh.h
index 44e5b81bb..998cd7c0e 100644
--- a/src/extras/geometries/qspheremesh.h
+++ b/src/extras/geometries/qspheremesh.h
@@ -87,7 +87,7 @@ private:
void setFirstInstance(int firstInstance);
void setRestartIndexValue(int index);
void setPrimitiveRestartEnabled(bool enabled);
- void setGeometry(Qt3DRender::QGeometry *geometry);
+ void setGeometry(Qt3DCore::QGeometry *geometry);
void setPrimitiveType(PrimitiveType primitiveType);
};
diff --git a/src/extras/geometries/qtorusgeometry.cpp b/src/extras/geometries/qtorusgeometry.cpp
index 1e65ab2ef..c9b430043 100644
--- a/src/extras/geometries/qtorusgeometry.cpp
+++ b/src/extras/geometries/qtorusgeometry.cpp
@@ -40,8 +40,8 @@
#include "qtorusgeometry.h"
#include "qtorusgeometry_p.h"
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
#include <QtGui/QVector3D>
#include <QtGui/QVector4D>
@@ -49,7 +49,7 @@
QT_BEGIN_NAMESPACE
-using namespace Qt3DRender;
+using namespace Qt3DCore;
namespace Qt3DExtras {
@@ -176,8 +176,8 @@ void QTorusGeometryPrivate::init()
m_texCoordAttribute = new QAttribute(q);
m_tangentAttribute = new QAttribute(q);
m_indexAttribute = new QAttribute(q);
- m_vertexBuffer = new Qt3DRender::QBuffer(q);
- m_indexBuffer = new Qt3DRender::QBuffer(q);
+ m_vertexBuffer = new Qt3DCore::QBuffer(q);
+ m_indexBuffer = new Qt3DCore::QBuffer(q);
// vec3 pos, vec2 tex, vec3 normal, vec4 tangent
const quint32 elementSize = 3 + 2 + 3 + 4;
const quint32 stride = elementSize * sizeof(float);
@@ -311,7 +311,7 @@ QByteArray QTorusGeometryPrivate::generateIndexData() const
* \brief The QTorusGeometry class allows creation of a torus in 3D space.
* \since 5.7
* \ingroup geometries
- * \inherits Qt3DRender::QGeometry
+ * \inherits Qt3DCore::QGeometry
*
* The QTorusGeometry class is most commonly used internally by the QTorusMesh
* but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.
diff --git a/src/extras/geometries/qtorusgeometry.h b/src/extras/geometries/qtorusgeometry.h
index cd4a4bb06..3fe159aa7 100644
--- a/src/extras/geometries/qtorusgeometry.h
+++ b/src/extras/geometries/qtorusgeometry.h
@@ -41,31 +41,31 @@
#define QT3DEXTRAS_QTORUSGEOMETRY_H
#include <Qt3DExtras/qt3dextras_global.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
class QTorusGeometryPrivate;
-class Q_3DEXTRASSHARED_EXPORT QTorusGeometry : public Qt3DRender::QGeometry
+class Q_3DEXTRASSHARED_EXPORT QTorusGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged)
Q_PROPERTY(int slices READ slices WRITE setSlices NOTIFY slicesChanged)
Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged)
Q_PROPERTY(float minorRadius READ minorRadius WRITE setMinorRadius NOTIFY minorRadiusChanged)
- Q_PROPERTY(Qt3DRender::QAttribute *positionAttribute READ positionAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *normalAttribute READ normalAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
- Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *positionAttribute READ positionAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *normalAttribute READ normalAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *texCoordAttribute READ texCoordAttribute CONSTANT)
+ Q_PROPERTY(Qt3DCore::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
explicit QTorusGeometry(QNode *parent = nullptr);
@@ -79,10 +79,10 @@ public:
float radius() const;
float minorRadius() const;
- Qt3DRender::QAttribute *positionAttribute() const;
- Qt3DRender::QAttribute *normalAttribute() const;
- Qt3DRender::QAttribute *texCoordAttribute() const;
- Qt3DRender::QAttribute *indexAttribute() const;
+ Qt3DCore::QAttribute *positionAttribute() const;
+ Qt3DCore::QAttribute *normalAttribute() const;
+ Qt3DCore::QAttribute *texCoordAttribute() const;
+ Qt3DCore::QAttribute *indexAttribute() const;
public Q_SLOTS:
void setRings(int rings);
diff --git a/src/extras/geometries/qtorusgeometry_p.h b/src/extras/geometries/qtorusgeometry_p.h
index c05e03835..28572261e 100644
--- a/src/extras/geometries/qtorusgeometry_p.h
+++ b/src/extras/geometries/qtorusgeometry_p.h
@@ -51,20 +51,21 @@
// We mean it.
//
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DExtras/qtorusgeometry.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
+namespace Qt3DCore {
class QAttribute;
class QBuffer;
-} // Qt3DRender
+} // Qt3DCore
namespace Qt3DExtras {
-class QTorusGeometryPrivate : public Qt3DRender::QGeometryPrivate
+class QTorusGeometryPrivate : public Qt3DCore::QGeometryPrivate
{
public:
QTorusGeometryPrivate();
@@ -74,13 +75,13 @@ public:
int m_slices;
float m_radius;
float m_minorRadius;
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QAttribute *m_normalAttribute;
- Qt3DRender::QAttribute *m_texCoordAttribute;
- Qt3DRender::QAttribute *m_tangentAttribute;
- Qt3DRender::QAttribute *m_indexAttribute;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QAttribute *m_normalAttribute;
+ Qt3DCore::QAttribute *m_texCoordAttribute;
+ Qt3DCore::QAttribute *m_tangentAttribute;
+ Qt3DCore::QAttribute *m_indexAttribute;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
Q_DECLARE_PUBLIC(QTorusGeometry)
diff --git a/src/extras/geometries/qtorusmesh.h b/src/extras/geometries/qtorusmesh.h
index 97bde10a2..2fd9f0a23 100644
--- a/src/extras/geometries/qtorusmesh.h
+++ b/src/extras/geometries/qtorusmesh.h
@@ -85,7 +85,7 @@ private:
void setFirstInstance(int firstInstance);
void setRestartIndexValue(int index);
void setPrimitiveRestartEnabled(bool enabled);
- void setGeometry(Qt3DRender::QGeometry *geometry);
+ void setGeometry(Qt3DCore::QGeometry *geometry);
void setPrimitiveType(PrimitiveType primitiveType);
};
diff --git a/src/extras/text/distancefieldtextrenderer.cpp b/src/extras/text/distancefieldtextrenderer.cpp
index 4cf9c0b4a..af4840a36 100644
--- a/src/extras/text/distancefieldtextrenderer.cpp
+++ b/src/extras/text/distancefieldtextrenderer.cpp
@@ -37,10 +37,10 @@
**
****************************************************************************/
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/qmaterial.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DExtras/private/qtext2dmaterial_p.h>
@@ -77,33 +77,33 @@ void DistanceFieldTextRendererPrivate::init()
m_renderer = new Qt3DRender::QGeometryRenderer(q);
m_renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Triangles);
- m_geometry = new Qt3DRender::QGeometry(m_renderer);
+ m_geometry = new Qt3DCore::QGeometry(m_renderer);
m_renderer->setGeometry(m_geometry);
- m_vertexBuffer = new Qt3DRender::QBuffer(m_geometry);
- m_indexBuffer = new Qt3DRender::QBuffer(m_geometry);
+ m_vertexBuffer = new Qt3DCore::QBuffer(m_geometry);
+ m_indexBuffer = new Qt3DCore::QBuffer(m_geometry);
- m_positionAttr = new Qt3DRender::QAttribute(m_geometry);
- m_positionAttr->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- m_positionAttr->setVertexBaseType(Qt3DRender::QAttribute::Float);
- m_positionAttr->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ m_positionAttr = new Qt3DCore::QAttribute(m_geometry);
+ m_positionAttr->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ m_positionAttr->setVertexBaseType(Qt3DCore::QAttribute::Float);
+ m_positionAttr->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
m_positionAttr->setVertexSize(3);
m_positionAttr->setByteStride(5 * sizeof(float));
m_positionAttr->setByteOffset(0);
m_positionAttr->setBuffer(m_vertexBuffer);
- m_texCoordAttr = new Qt3DRender::QAttribute(m_geometry);
- m_texCoordAttr->setName(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
- m_texCoordAttr->setVertexBaseType(Qt3DRender::QAttribute::Float);
- m_texCoordAttr->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ m_texCoordAttr = new Qt3DCore::QAttribute(m_geometry);
+ m_texCoordAttr->setName(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
+ m_texCoordAttr->setVertexBaseType(Qt3DCore::QAttribute::Float);
+ m_texCoordAttr->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
m_texCoordAttr->setVertexSize(2);
m_texCoordAttr->setByteStride(5 * sizeof(float));
m_texCoordAttr->setByteOffset(3 * sizeof(float));
m_texCoordAttr->setBuffer(m_vertexBuffer);
- m_indexAttr = new Qt3DRender::QAttribute(m_geometry);
- m_indexAttr->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
- m_indexAttr->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ m_indexAttr = new Qt3DCore::QAttribute(m_geometry);
+ m_indexAttr->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
+ m_indexAttr->setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
m_indexAttr->setBuffer(m_indexBuffer);
m_geometry->addAttribute(m_positionAttr);
diff --git a/src/extras/text/distancefieldtextrenderer_p_p.h b/src/extras/text/distancefieldtextrenderer_p_p.h
index af4bc4723..76471c5ba 100644
--- a/src/extras/text/distancefieldtextrenderer_p_p.h
+++ b/src/extras/text/distancefieldtextrenderer_p_p.h
@@ -56,14 +56,17 @@
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
-class QGeometryRenderer;
+namespace Qt3DCore {
class QGeometry;
class QMaterial;
class QAttribute;
class QBuffer;
}
+namespace Qt3DRender {
+class QGeometryRenderer;
+}
+
namespace Qt3DExtras {
class QText2DMaterial;
@@ -79,12 +82,12 @@ public:
void init();
Qt3DRender::QGeometryRenderer *m_renderer;
- Qt3DRender::QGeometry *m_geometry;
- Qt3DRender::QAttribute *m_positionAttr;
- Qt3DRender::QAttribute *m_texCoordAttr;
- Qt3DRender::QAttribute *m_indexAttr;
- Qt3DRender::QBuffer *m_vertexBuffer;
- Qt3DRender::QBuffer *m_indexBuffer;
+ Qt3DCore::QGeometry *m_geometry;
+ Qt3DCore::QAttribute *m_positionAttr;
+ Qt3DCore::QAttribute *m_texCoordAttr;
+ Qt3DCore::QAttribute *m_indexAttr;
+ Qt3DCore::QBuffer *m_vertexBuffer;
+ Qt3DCore::QBuffer *m_indexBuffer;
QText2DMaterial *m_material;
};
diff --git a/src/extras/text/qtext2dentity.cpp b/src/extras/text/qtext2dentity.cpp
index 897672782..a159ffab5 100644
--- a/src/extras/text/qtext2dentity.cpp
+++ b/src/extras/text/qtext2dentity.cpp
@@ -48,10 +48,10 @@
#include <QtGui/private/qfont_p.h>
#include <QtGui/private/qdistancefield_p.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/qmaterial.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DCore/private/qscene_p.h>
diff --git a/src/extras/text/qtextureatlas.cpp b/src/extras/text/qtextureatlas.cpp
index 4ab992224..d5d97a3a7 100644
--- a/src/extras/text/qtextureatlas.cpp
+++ b/src/extras/text/qtextureatlas.cpp
@@ -175,7 +175,7 @@ Qt3DRender::QTextureDataPtr QTextureAtlasGenerator::operator()()
bool QTextureAtlasGenerator::operator==(const QTextureGenerator &other) const
{
- const QTextureAtlasGenerator *otherFunctor = Qt3DRender::functor_cast<QTextureAtlasGenerator>(&other);
+ const QTextureAtlasGenerator *otherFunctor = Qt3DCore::functor_cast<QTextureAtlasGenerator>(&other);
return (otherFunctor != nullptr
&& otherFunctor->m_data == m_data
&& otherFunctor->m_atlasId == m_atlasId
diff --git a/src/plugins/geometryloaders/default/basegeometryloader.cpp b/src/plugins/geometryloaders/default/basegeometryloader.cpp
index 46e912a4e..a7c226c68 100644
--- a/src/plugins/geometryloaders/default/basegeometryloader.cpp
+++ b/src/plugins/geometryloaders/default/basegeometryloader.cpp
@@ -39,15 +39,17 @@
#include "basegeometryloader_p.h"
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/private/qaxisalignedboundingbox_p.h>
#include <Qt3DRender/private/renderlogging_p.h>
QT_BEGIN_NAMESPACE
+using namespace Qt3DCore;
+
namespace Qt3DRender {
Q_LOGGING_CATEGORY(BaseGeometryLoaderLog, "Qt3D.BaseGeometryLoader", QtWarningMsg)
@@ -60,7 +62,7 @@ BaseGeometryLoader::BaseGeometryLoader()
{
}
-QGeometry *BaseGeometryLoader::geometry() const
+Qt3DCore::QGeometry *BaseGeometryLoader::geometry() const
{
return m_geometry;
}
diff --git a/src/plugins/geometryloaders/default/basegeometryloader_p.h b/src/plugins/geometryloaders/default/basegeometryloader_p.h
index 0fe1e2763..2f9e25fab 100644
--- a/src/plugins/geometryloaders/default/basegeometryloader_p.h
+++ b/src/plugins/geometryloaders/default/basegeometryloader_p.h
@@ -67,9 +67,11 @@ QT_BEGIN_NAMESPACE
class QIODevice;
class QString;
-namespace Qt3DRender {
-
+namespace Qt3DCore {
class QGeometry;
+}
+
+namespace Qt3DRender {
class BaseGeometryLoader : public QGeometryLoaderInterface
{
@@ -96,7 +98,7 @@ public:
QVector<QVector4D> tangents() const { return m_tangents; }
QVector<unsigned int> indices() const { return m_indices; }
- QGeometry *geometry() const override;
+ Qt3DCore::QGeometry *geometry() const override;
bool load(QIODevice *ioDev, const QString &subMesh = QString()) override;
@@ -124,7 +126,7 @@ protected:
QVector<QVector4D> m_tangents;
QVector<unsigned int> m_indices;
- QGeometry *m_geometry;
+ Qt3DCore::QGeometry *m_geometry;
};
struct FaceIndices
diff --git a/src/plugins/geometryloaders/fbx/fbxgeometryloader.cpp b/src/plugins/geometryloaders/fbx/fbxgeometryloader.cpp
index 355096448..e8b92dc82 100644
--- a/src/plugins/geometryloaders/fbx/fbxgeometryloader.cpp
+++ b/src/plugins/geometryloaders/fbx/fbxgeometryloader.cpp
@@ -41,9 +41,9 @@
#include <QtCore/QFileDevice>
-#include <Qt3DRender/QAttribute>
-#include <Qt3DRender/QBuffer>
-#include <Qt3DRender/QGeometry>
+#include <Qt3DCore/QAttribute>
+#include <Qt3DCore/QBuffer>
+#include <Qt3DCore/QGeometry>
#include <Qt3DRender/private/renderlogging_p.h>
#include <fbxsdk.h>
diff --git a/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp b/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp
index 2c8bb14c3..9f13ca2c6 100644
--- a/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp
+++ b/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp
@@ -46,8 +46,8 @@
#include <QOpenGLTexture>
-#include <Qt3DRender/QGeometry>
#include <Qt3DRender/private/renderlogging_p.h>
+#include <Qt3DCore/QGeometry>
#include <Qt3DCore/private/qloadgltf_p.h>
QT_BEGIN_NAMESPACE
@@ -57,6 +57,8 @@ QT_BEGIN_NAMESPACE
static_cast<const wchar_t*>(static_cast<const void*>(string.utf16()))
#endif
+using namespace Qt3DCore;
+
namespace Qt3DRender {
Q_LOGGING_CATEGORY(GLTFGeometryLoaderLog, "Qt3D.GLTFGeometryLoader", QtWarningMsg)
@@ -326,7 +328,7 @@ void GLTFGeometryLoader::processJSONBufferView(const QString &id, const QJsonObj
qUtf16PrintableImpl(bufferData.path), qUtf16PrintableImpl(id));
}
- Qt3DRender::QBuffer *b = new Qt3DRender::QBuffer();
+ Qt3DCore::QBuffer *b = new Qt3DCore::QBuffer();
b->setData(bytes);
m_gltf1.m_buffers[id] = b;
}
@@ -363,7 +365,7 @@ void GLTFGeometryLoader::processJSONBufferViewV2(const QJsonObject &json)
qUtf16PrintableImpl(bufferData.path));
}
- auto b = new Qt3DRender::QBuffer;
+ auto b = new Qt3DCore::QBuffer;
b->setData(bytes);
m_gltf2.m_buffers.push_back(b);
}
@@ -409,7 +411,7 @@ void GLTFGeometryLoader::processJSONMesh(const QString &id, const QJsonObject &j
attributeName = attrName;
//Get buffer handle for accessor
- Qt3DRender::QBuffer *buffer = m_gltf1.m_buffers.value(accessorIt->bufferViewName, nullptr);
+ Qt3DCore::QBuffer *buffer = m_gltf1.m_buffers.value(accessorIt->bufferViewName, nullptr);
if (Q_UNLIKELY(!buffer)) {
qCWarning(GLTFGeometryLoaderLog, "unknown buffer-view: %ls processing accessor: %ls",
qUtf16PrintableImpl(accessorIt->bufferViewName), qUtf16PrintableImpl(id));
@@ -436,7 +438,7 @@ void GLTFGeometryLoader::processJSONMesh(const QString &id, const QJsonObject &j
qUtf16PrintableImpl(k), qUtf16PrintableImpl(id));
} else {
//Get buffer handle for accessor
- Qt3DRender::QBuffer *buffer = m_gltf1.m_buffers.value(accessorIt->bufferViewName, nullptr);
+ Qt3DCore::QBuffer *buffer = m_gltf1.m_buffers.value(accessorIt->bufferViewName, nullptr);
if (Q_UNLIKELY(!buffer)) {
qCWarning(GLTFGeometryLoaderLog, "unknown buffer-view: %ls processing accessor: %ls",
qUtf16PrintableImpl(accessorIt->bufferViewName), qUtf16PrintableImpl(id));
@@ -489,7 +491,7 @@ void GLTFGeometryLoader::processJSONMeshV2(const QJsonObject &json)
accessor.bufferViewIndex, qUtf16PrintableImpl(json.value(KEY_NAME).toString()));
continue;
}
- Qt3DRender::QBuffer *buffer = m_gltf2.m_buffers[accessor.bufferViewIndex];
+ Qt3DCore::QBuffer *buffer = m_gltf2.m_buffers[accessor.bufferViewIndex];
QAttribute *attribute = new QAttribute(buffer,
attributeName,
@@ -517,7 +519,7 @@ void GLTFGeometryLoader::processJSONMeshV2(const QJsonObject &json)
accessor.bufferViewIndex, qUtf16PrintableImpl(json.value(KEY_NAME).toString()));
continue;
}
- Qt3DRender::QBuffer *buffer = m_gltf2.m_buffers[accessor.bufferViewIndex];
+ Qt3DCore::QBuffer *buffer = m_gltf2.m_buffers[accessor.bufferViewIndex];
QAttribute *attribute = new QAttribute(buffer,
accessor.type,
diff --git a/src/plugins/geometryloaders/gltf/gltfgeometryloader.h b/src/plugins/geometryloaders/gltf/gltfgeometryloader.h
index 404668dd0..36ac0f174 100644
--- a/src/plugins/geometryloaders/gltf/gltfgeometryloader.h
+++ b/src/plugins/geometryloaders/gltf/gltfgeometryloader.h
@@ -54,13 +54,17 @@
#include <QtCore/QJsonDocument>
#include <Qt3DRender/private/qgeometryloaderinterface_p.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <private/qlocale_tools_p.h>
QT_BEGIN_NAMESPACE
+namespace Qt3DCore {
+class QGeometry;
+}
+
namespace Qt3DRender {
#define GLTFGEOMETRYLOADER_EXT QLatin1String("gltf")
@@ -77,7 +81,6 @@ class QRenderState;
class QTechnique;
class QParameter;
class QGeometryRenderer;
-class QGeometry;
class GLTFGeometryLoader : public QGeometryLoaderInterface
{
@@ -111,7 +114,7 @@ class GLTFGeometryLoader : public QGeometryLoaderInterface
QString bufferViewName;
int bufferViewIndex;
- QAttribute::VertexBaseType type;
+ Qt3DCore::QAttribute::VertexBaseType type;
uint dataSize;
int count;
int offset;
@@ -122,13 +125,13 @@ class GLTFGeometryLoader : public QGeometryLoaderInterface
{
QHash<QString, AccessorData> m_accessorDict;
QHash<QString, BufferData> m_bufferDatas;
- QHash<QString, Qt3DRender::QBuffer*> m_buffers;
+ QHash<QString, Qt3DCore::QBuffer*> m_buffers;
};
struct Gltf2
{
QVector<BufferData> m_bufferDatas;
- QVector<Qt3DRender::QBuffer*> m_buffers;
+ QVector<Qt3DCore::QBuffer*> m_buffers;
QVector<AccessorData> m_accessors;
};
@@ -137,7 +140,7 @@ public:
GLTFGeometryLoader();
~GLTFGeometryLoader();
- QGeometry *geometry() const final;
+ Qt3DCore::QGeometry *geometry() const final;
bool load(QIODevice *ioDev, const QString &subMesh = QString()) final;
@@ -170,7 +173,7 @@ protected:
QByteArray resolveLocalData(const QString &path) const;
- static QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
+ static Qt3DCore::QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
static uint accessorDataSizeFromJson(const QString &type);
private:
@@ -181,7 +184,7 @@ private:
Gltf1 m_gltf1;
Gltf2 m_gltf2;
- QGeometry *m_geometry;
+ Qt3DCore::QGeometry *m_geometry;
};
} // namespace Qt3DRender
diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp
index 508b38755..30a8184b5 100644
--- a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp
+++ b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp
@@ -52,9 +52,7 @@
#include <Qt3DRender/private/buffermanager_p.h>
#include <Qt3DRender/private/managers_p.h>
#include <Qt3DRender/private/attachmentpack_p.h>
-#include <Qt3DRender/private/qbuffer_p.h>
#include <Qt3DRender/private/attachmentpack_p.h>
-#include <Qt3DRender/private/qbuffer_p.h>
#include <Qt3DRender/private/renderstateset_p.h>
#include <QOpenGLShaderProgram>
#include <glresourcemanagers_p.h>
@@ -971,8 +969,10 @@ GLuint GraphicsContext::byteSizeFromType(GLint type)
return 0;
}
-GLint GraphicsContext::glDataTypeFromAttributeDataType(QAttribute::VertexBaseType dataType)
+GLint GraphicsContext::glDataTypeFromAttributeDataType(Qt3DCore::QAttribute::VertexBaseType dataType)
{
+ using namespace Qt3DCore;
+
switch (dataType) {
case QAttribute::Byte:
return GL_BYTE;
diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h
index 8da1a420c..ba474a89b 100644
--- a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h
+++ b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h
@@ -60,9 +60,9 @@
#include <QMatrix4x4>
#include <QBitArray>
#include <QImage>
+#include <Qt3DCore/qattribute.h>
#include <Qt3DRender/qclearbuffers.h>
#include <Qt3DRender/private/shader_p.h>
-#include <Qt3DRender/qattribute.h>
#include <Qt3DRender/qmemorybarrier.h>
#include <Qt3DRender/private/handle_types_p.h>
#include <Qt3DRender/private/qgraphicsapifilter_p.h>
@@ -184,7 +184,7 @@ public:
static GLint elementType(GLint type);
static GLint tupleSizeFromType(GLint type);
static GLuint byteSizeFromType(GLint type);
- static GLint glDataTypeFromAttributeDataType(QAttribute::VertexBaseType dataType);
+ static GLint glDataTypeFromAttributeDataType(Qt3DCore::QAttribute::VertexBaseType dataType);
bool supportsDrawBuffersBlend() const;
bool supportsVAO() const { return m_supportsVAO; }
diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
index b22477435..519f2ae98 100644
--- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
+++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
@@ -39,6 +39,7 @@
#include "submissioncontext_p.h"
+#include <Qt3DCore/private/qbuffer_p.h>
#include <Qt3DRender/qgraphicsapifilter.h>
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qcullface.h>
@@ -54,7 +55,6 @@
#include <Qt3DRender/private/buffermanager_p.h>
#include <Qt3DRender/private/managers_p.h>
#include <Qt3DRender/private/attachmentpack_p.h>
-#include <Qt3DRender/private/qbuffer_p.h>
#include <Qt3DRender/private/stringtoint_p.h>
#include <gltexture_p.h>
#include <rendercommand_p.h>
@@ -97,6 +97,8 @@ QT_BEGIN_NAMESPACE
#define GL_DRAW_FRAMEBUFFER 0x8CA9
#endif
+using namespace Qt3DCore;
+
namespace Qt3DRender {
namespace Render {
namespace OpenGL {
@@ -1461,7 +1463,7 @@ void SubmissionContext::uploadDataToGLBuffer(Buffer *buffer, GLBuffer *b, bool r
// * partial buffer updates where received
// TO DO: Handle usage pattern
- QVector<Qt3DRender::QBufferUpdate> updates = std::move(buffer->pendingBufferUpdates());
+ QVector<Qt3DCore::QBufferUpdate> updates = std::move(buffer->pendingBufferUpdates());
for (auto it = updates.begin(); it != updates.end(); ++it) {
auto update = it;
// We have a partial update
diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h
index d43cae4f8..59b2b78f3 100644
--- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h
+++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h
@@ -59,7 +59,6 @@
#include <texturesubmissioncontext_p.h>
#include <imagesubmissioncontext_p.h>
#include <Qt3DRender/qclearbuffers.h>
-#include <Qt3DRender/qattribute.h>
#include <Qt3DRender/private/handle_types_p.h>
#include <Qt3DRender/private/attachmentpack_p.h>
diff --git a/src/plugins/renderers/opengl/renderer/renderer.cpp b/src/plugins/renderers/opengl/renderer/renderer.cpp
index 2dafa15c5..deb77ee4b 100644
--- a/src/plugins/renderers/opengl/renderer/renderer.cpp
+++ b/src/plugins/renderers/opengl/renderer/renderer.cpp
@@ -1116,7 +1116,7 @@ void Renderer::lookForDownloadableBuffers()
const QVector<HBuffer> activeBufferHandles = m_nodesManager->bufferManager()->activeHandles();
for (const HBuffer &handle : activeBufferHandles) {
Buffer *buffer = m_nodesManager->bufferManager()->data(handle);
- if (buffer->access() & QBuffer::Read)
+ if (buffer->access() & Qt3DCore::QBuffer::Read)
m_downloadableBuffers.push_back(buffer->peerId());
}
}
diff --git a/src/plugins/renderers/opengl/renderer/renderview.cpp b/src/plugins/renderers/opengl/renderer/renderview.cpp
index 47f4beffd..326a8a91b 100644
--- a/src/plugins/renderers/opengl/renderer/renderview.cpp
+++ b/src/plugins/renderers/opengl/renderer/renderview.cpp
@@ -381,8 +381,8 @@ struct SubRangeSorter
{
static void sortSubRange(CommandIt begin, const CommandIt end)
{
- Q_UNUSED(begin);
- Q_UNUSED(end);
+ Q_UNUSED(begin)
+ Q_UNUSED(end)
Q_UNREACHABLE();
}
};
@@ -705,13 +705,13 @@ EntityRenderCommandData RenderView::buildDrawRenderCommands(const QVector<Entity
for (Qt3DCore::QNodeId attributeId : attributeIds) {
Attribute *attribute = m_manager->attributeManager()->lookupResource(attributeId);
switch (attribute->attributeType()) {
- case QAttribute::IndexAttribute:
+ case Qt3DCore::QAttribute::IndexAttribute:
indexAttribute = attribute;
break;
- case QAttribute::DrawIndirectAttribute:
+ case Qt3DCore::QAttribute::DrawIndirectAttribute:
indirectAttribute = attribute;
break;
- case QAttribute::VertexAttribute:
+ case Qt3DCore::QAttribute::VertexAttribute:
estimatedCount = std::max(int(attribute->count()), estimatedCount);
break;
default:
diff --git a/src/plugins/sceneparsers/assimp/assimpimporter.cpp b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
index ef28c577f..7655bf931 100644
--- a/src/plugins/sceneparsers/assimp/assimpimporter.cpp
+++ b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
@@ -41,20 +41,20 @@
#include <Qt3DCore/qentity.h>
#include <Qt3DCore/qtransform.h>
-#include <Qt3DExtras/qdiffusemapmaterial.h>
-#include <Qt3DExtras/qdiffusespecularmapmaterial.h>
-#include <Qt3DExtras/qphongmaterial.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/qcameralens.h>
#include <Qt3DRender/qeffect.h>
-#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qmesh.h>
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qtexture.h>
#include <Qt3DRender/qtextureimagedatagenerator.h>
+#include <Qt3DExtras/qdiffusemapmaterial.h>
+#include <Qt3DExtras/qdiffusespecularmapmaterial.h>
+#include <Qt3DExtras/qphongmaterial.h>
#include <Qt3DExtras/qmorphphongmaterial.h>
#include <Qt3DExtras/qdiffusemapmaterial.h>
#include <Qt3DExtras/qdiffusespecularmapmaterial.h>
@@ -67,8 +67,8 @@
#include <qmath.h>
#include <Qt3DCore/private/qabstractnodefactory_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <Qt3DRender/private/renderlogging_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
QT_BEGIN_NAMESPACE
@@ -394,7 +394,7 @@ bool AssimpImporter::areAssimpExtensions(const QStringList &extensions)
*/
void AssimpImporter::setSource(const QUrl &source)
{
- const QString path = QUrlHelper::urlToLocalFileOrQrc(source);
+ const QString path = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(source);
QFileInfo file(path);
m_sceneDir = file.absoluteDir();
if (!file.exists()) {
@@ -702,12 +702,12 @@ QGeometryRenderer *AssimpImporter::loadMesh(uint meshIndex)
QGeometryRenderer *geometryRenderer = QAbstractNodeFactory::createNode<QGeometryRenderer>("QGeometryRenderer");
QGeometry *meshGeometry = QAbstractNodeFactory::createNode<QGeometry>("QGeometry");
meshGeometry->setParent(geometryRenderer);
- Qt3DRender::QBuffer *vertexBuffer = QAbstractNodeFactory::createNode<Qt3DRender::QBuffer>("QBuffer");
+ Qt3DCore::QBuffer *vertexBuffer = QAbstractNodeFactory::createNode<Qt3DCore::QBuffer>("QBuffer");
vertexBuffer->setParent(meshGeometry);
- vertexBuffer->setType(Qt3DRender::QBuffer::VertexBuffer);
- Qt3DRender::QBuffer *indexBuffer = QAbstractNodeFactory::createNode<Qt3DRender::QBuffer>("QBuffer");
+ vertexBuffer->setType(Qt3DCore::QBuffer::VertexBuffer);
+ Qt3DCore::QBuffer *indexBuffer = QAbstractNodeFactory::createNode<Qt3DCore::QBuffer>("QBuffer");
indexBuffer->setParent(meshGeometry);
- indexBuffer->setType(Qt3DRender::QBuffer::IndexBuffer);
+ indexBuffer->setType(Qt3DCore::QBuffer::IndexBuffer);
geometryRenderer->setGeometry(meshGeometry);
@@ -922,8 +922,8 @@ QGeometryRenderer *AssimpImporter::loadMesh(uint meshIndex)
}
}
- Qt3DRender::QBuffer *targetBuffer
- = QAbstractNodeFactory::createNode<Qt3DRender::QBuffer>("QBuffer");
+ Qt3DCore::QBuffer *targetBuffer
+ = QAbstractNodeFactory::createNode<Qt3DCore::QBuffer>("QBuffer");
targetBuffer->setData(targetBufferArray);
targetBuffer->setParent(meshGeometry);
diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp
index 860dec3e7..b141a44a5 100644
--- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp
+++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp
@@ -50,6 +50,7 @@
#include <Qt3DCore/qentity.h>
#include <Qt3DCore/qtransform.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/qcameralens.h>
#include <Qt3DRender/qcamera.h>
@@ -74,7 +75,6 @@
#include <Qt3DRender/qstenciltestarguments.h>
#include <Qt3DRender/qeffect.h>
#include <Qt3DRender/qfrontface.h>
-#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qgraphicsapifilter.h>
@@ -1522,7 +1522,7 @@ void GLTFImporter::processJSONBufferView(const QString &id, const QJsonObject& j
qUtf16PrintableImpl(bufferData.path), qUtf16PrintableImpl(id));
}
- Qt3DRender::QBuffer *b = new Qt3DRender::QBuffer();
+ Qt3DCore::QBuffer *b = new Qt3DCore::QBuffer();
b->setData(bytes);
m_buffers[id] = b;
}
@@ -1768,7 +1768,7 @@ void GLTFImporter::processJSONMesh(const QString &id, const QJsonObject &json)
attributeName = attrName;
//Get buffer handle for accessor
- Qt3DRender::QBuffer *buffer = m_buffers.value(accessorIt->bufferViewName, nullptr);
+ Qt3DCore::QBuffer *buffer = m_buffers.value(accessorIt->bufferViewName, nullptr);
if (Q_UNLIKELY(!buffer)) {
qCWarning(GLTFImporterLog, "unknown buffer-view: %ls processing accessor: %ls",
qUtf16PrintableImpl(accessorIt->bufferViewName),
@@ -1796,7 +1796,7 @@ void GLTFImporter::processJSONMesh(const QString &id, const QJsonObject &json)
qUtf16PrintableImpl(accIndex), qUtf16PrintableImpl(id));
} else {
//Get buffer handle for accessor
- Qt3DRender::QBuffer *buffer = m_buffers.value(accessorIt->bufferViewName, nullptr);
+ Qt3DCore::QBuffer *buffer = m_buffers.value(accessorIt->bufferViewName, nullptr);
if (Q_UNLIKELY(!buffer)) {
qCWarning(GLTFImporterLog, "unknown buffer-view: %ls processing accessor: %ls",
qUtf16PrintableImpl(accessorIt->bufferViewName),
diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.h b/src/plugins/sceneparsers/gltf/gltfimporter.h
index 271ce5979..79f35ebad 100644
--- a/src/plugins/sceneparsers/gltf/gltfimporter.h
+++ b/src/plugins/sceneparsers/gltf/gltfimporter.h
@@ -52,8 +52,8 @@
// We mean it.
//
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <QtCore/qjsondocument.h>
#include <QtCore/qjsonobject.h>
#include <QtCore/qhash.h>
@@ -135,7 +135,7 @@ private:
explicit AccessorData(const QJsonObject& json, int major, int minor);
QString bufferViewName;
- QAttribute::VertexBaseType type;
+ Qt3DCore::QAttribute::VertexBaseType type;
uint dataSize;
int count;
int offset;
@@ -178,7 +178,7 @@ private:
QByteArray resolveLocalData(const QString &path) const;
QVariant parameterValueFromJSON(int type, const QJsonValue &value) const;
- static QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
+ static Qt3DCore::QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
static uint accessorDataSizeFromJson(const QString &type);
static QRenderState *buildStateEnable(int state);
@@ -212,7 +212,7 @@ private:
QHash<QString, QMaterial*> m_materialCache;
QHash<QString, BufferData> m_bufferDatas;
- QHash<QString, Qt3DRender::QBuffer*> m_buffers;
+ QHash<QString, Qt3DCore::QBuffer*> m_buffers;
QHash<QString, QString> m_shaderPaths;
QHash<QString, QShaderProgram*> m_programs;
diff --git a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
index 9fced8e89..8b4fac1ce 100644
--- a/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
+++ b/src/plugins/sceneparsers/gltfexport/gltfexporter.cpp
@@ -58,14 +58,15 @@
#include <QtGui/qmatrix4x4.h>
#include <Qt3DCore/qentity.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DCore/qtransform.h>
#include <Qt3DRender/qcameralens.h>
#include <Qt3DRender/qcamera.h>
#include <Qt3DRender/qblendequation.h>
#include <Qt3DRender/qblendequationarguments.h>
#include <Qt3DRender/qeffect.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qgraphicsapifilter.h>
#include <Qt3DRender/qparameter.h>
@@ -74,7 +75,6 @@
#include <Qt3DRender/qpointlight.h>
#include <Qt3DRender/qspotlight.h>
#include <Qt3DRender/qdirectionallight.h>
-#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DRender/qtechnique.h>
#include <Qt3DRender/qalphacoverage.h>
diff --git a/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp b/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp
index 75fa7b2da..a15629b68 100644
--- a/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp
+++ b/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp
@@ -44,6 +44,9 @@
#include <Qt3DCore/qskeletonloader.h>
#include <Qt3DCore/qtransform.h>
#include <Qt3DCore/qjoint.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
#include <QtCore/qvariantanimation.h>
#include <Qt3DQuick/private/quick3dnodev9_p.h>
@@ -53,6 +56,8 @@
#include <Qt3DQuick/private/quick3djoint_p.h>
#include <Qt3DQuick/private/qquaternionanimation_p.h>
#include <Qt3DQuick/private/qt3dquick_global_p.h>
+#include <Qt3DQuick/private/quick3dbuffer_p.h>
+#include <Qt3DQuick/private/quick3dgeometry_p.h>
#include <QtQml/qqml.h>
@@ -73,6 +78,13 @@ void Qt3DQuick3DCorePlugin::registerTypes(const char *uri)
qmlRegisterType<Qt3DCore::QArmature>(uri, 2, 10, "Armature");
qmlRegisterUncreatableType<Qt3DCore::QAbstractSkeleton>(uri, 2, 10, "AbstractSkeleton", QStringLiteral("AbstractSkeleton is an abstract base class"));
qmlRegisterType<Qt3DCore::QSkeletonLoader>(uri, 2, 10, "SkeletonLoader");
+ qmlRegisterType<Qt3DCore::QAttribute>(uri, 2, 0, "Attribute");
+ qmlRegisterType<Qt3DCore::QAttribute, 10>(uri, 2, 10, "Attribute");
+ qmlRegisterType<Qt3DCore::QAttribute, 11>(uri, 2, 11, "Attribute");
+ qmlRegisterUncreatableType<Qt3DCore::QBuffer>(uri, 2, 0, "BufferBase", QStringLiteral("Use Quick3DBuffer in QML"));
+ qmlRegisterUncreatableType<Qt3DCore::QBuffer, 9>(uri, 2, 9, "BufferBase", QStringLiteral("Use Quick3DBuffer in QML"));
+ qmlRegisterType<Qt3DCore::Quick::Quick3DBuffer>(uri, 2, 0, "Buffer");
+ Qt3DCore::Quick::registerExtendedType<Qt3DCore::QGeometry, Qt3DCore::Quick::Quick3DGeometry>("QGeometry", "Qt3D.Core/Geometry", uri, 2, 0, "Geometry");
qmlRegisterType<Qt3DCore::Quick::QQuaternionAnimation>(uri, 2, 0, "QuaternionAnimation");
qRegisterAnimationInterpolator<QQuaternion>(Qt3DCore::Quick::q_quaternionInterpolator);
diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
index e42be550d..9992ace97 100644
--- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
+++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
@@ -42,10 +42,8 @@
#include <Qt3DRender/qabstractlight.h>
#include <Qt3DRender/qalphacoverage.h>
#include <Qt3DRender/qalphatest.h>
-#include <Qt3DRender/qattribute.h>
#include <Qt3DRender/qblendequation.h>
#include <Qt3DRender/qblendequationarguments.h>
-#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbuffercapture.h>
#include <Qt3DRender/qcamera.h>
#include <Qt3DRender/qcameralens.h>
@@ -65,7 +63,6 @@
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qfrontface.h>
#include <Qt3DRender/qfrustumculling.h>
-#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DRender/qgraphicsapifilter.h>
#include <Qt3DRender/qlayer.h>
@@ -125,9 +122,7 @@
#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <Qt3DQuickRender/private/quick3dbuffer_p.h>
#include <Qt3DQuickRender/private/quick3deffect_p.h>
-#include <Qt3DQuickRender/private/quick3dgeometry_p.h>
#include <Qt3DQuickRender/private/quick3dlayerfilter_p.h>
#include <Qt3DQuickRender/private/quick3dmaterial_p.h>
#include <Qt3DQuickRender/private/quick3dmemorybarrier_p.h>
@@ -223,13 +218,6 @@ void Qt3DQuick3DRenderPlugin::registerTypes(const char *uri)
qmlRegisterType<Qt3DRender::QShaderImage>(uri, 2, 14, "ShaderImage");
// Geometry
- qmlRegisterType<Qt3DRender::QAttribute>(uri, 2, 0, "Attribute");
- qmlRegisterType<Qt3DRender::QAttribute, 10>(uri, 2, 10, "Attribute");
- qmlRegisterType<Qt3DRender::QAttribute, 11>(uri, 2, 11, "Attribute");
- qmlRegisterUncreatableType<Qt3DRender::QBuffer>(uri, 2, 0, "BufferBase", QStringLiteral("Use Quick3DBuffer in QML"));
- qmlRegisterUncreatableType<Qt3DRender::QBuffer, 9>(uri, 2, 9, "BufferBase", QStringLiteral("Use Quick3DBuffer in QML"));
- qmlRegisterType<Qt3DRender::Render::Quick::Quick3DBuffer>(uri, 2, 0, "Buffer");
- Qt3DRender::Quick::registerExtendedType<Qt3DRender::QGeometry, Qt3DRender::Render::Quick::Quick3DGeometry>("QGeometry", "Qt3D.Render/Geometry", uri, 2, 0, "Geometry");
qmlRegisterType<Qt3DRender::QGeometryRenderer>(uri, 2, 0, "GeometryRenderer");
qmlRegisterType<Qt3DRender::QLevelOfDetail>(uri, 2, 9, "LevelOfDetail");
qmlRegisterType<Qt3DRender::QLevelOfDetailSwitch>(uri, 2, 9, "LevelOfDetailSwitch");
diff --git a/src/quick3d/quick3d/items/items.pri b/src/quick3d/quick3d/items/items.pri
index 36e7ccedc..febe5c395 100644
--- a/src/quick3d/quick3d/items/items.pri
+++ b/src/quick3d/quick3d/items/items.pri
@@ -5,7 +5,9 @@ HEADERS += \
$$PWD/quick3dentityloader_p.h \
$$PWD/quick3dnode_p.h \
$$PWD/quick3dnodev9_p.h \
- $$PWD/quick3djoint_p.h
+ $$PWD/quick3djoint_p.h \
+ $$PWD/quick3dbuffer_p.h \
+ $$PWD/quick3dgeometry_p.h
SOURCES += \
$$PWD/quick3dnode.cpp \
@@ -13,6 +15,8 @@ SOURCES += \
$$PWD/quick3dentityloader.cpp \
$$PWD/quick3dnodeinstantiator.cpp \
$$PWD/quick3dnodev9.cpp \
- $$PWD/quick3djoint.cpp
+ $$PWD/quick3djoint.cpp \
+ $$PWD/quick3dbuffer.cpp \
+ $$PWD/quick3dgeometry.cpp
INCLUDEPATH += $$PWD
diff --git a/src/quick3d/quick3drender/items/quick3dbuffer.cpp b/src/quick3d/quick3d/items/quick3dbuffer.cpp
index 9ff349118..7beb1cc90 100644
--- a/src/quick3d/quick3drender/items/quick3dbuffer.cpp
+++ b/src/quick3d/quick3d/items/quick3dbuffer.cpp
@@ -40,20 +40,17 @@
#include <QtQml/QJSValue>
#include <QtQml/QQmlEngine>
-#include <Qt3DQuickRender/private/quick3dbuffer_p.h>
+#include <Qt3DQuick/private/quick3dbuffer_p.h>
#include <QtQml/private/qqmlengine_p.h>
#include <QtQml/private/qjsvalue_p.h>
#include <QtQml/private/qv4typedarray_p.h>
#include <QtQml/private/qv4arraybuffer_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <QtCore/qfile.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
-
-namespace Render {
-
+namespace Qt3DCore {
namespace Quick {
namespace {
@@ -61,11 +58,11 @@ const int jsValueTypeId = qMetaTypeId<QJSValue>();
}
Quick3DBuffer::Quick3DBuffer(Qt3DCore::QNode *parent)
- : Qt3DRender::QBuffer(parent)
+ : Qt3DCore::QBuffer(parent)
, m_engine(nullptr)
, m_v4engine(nullptr)
{
- QObject::connect(this, &Qt3DRender::QBuffer::dataChanged, this, &Quick3DBuffer::bufferDataChanged);
+ QObject::connect(this, &Qt3DCore::QBuffer::dataChanged, this, &Quick3DBuffer::bufferDataChanged);
}
QByteArray Quick3DBuffer::convertToRawData(const QJSValue &jsValue)
@@ -120,7 +117,7 @@ void Quick3DBuffer::updateData(int offset, const QVariant &bufferData)
*/
QVariant Quick3DBuffer::readBinaryFile(const QUrl &fileUrl)
{
- QFile f(Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(fileUrl));
+ QFile f(Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(fileUrl));
QByteArray data;
if (f.open(QIODevice::ReadOnly))
@@ -137,9 +134,6 @@ void Quick3DBuffer::initEngines()
}
} // Quick
-
-} // Render
-
-} // Qt3DRender
+} // Qt3DCore
QT_END_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dbuffer_p.h b/src/quick3d/quick3d/items/quick3dbuffer_p.h
index 233cc3faf..b75164e4c 100644
--- a/src/quick3d/quick3drender/items/quick3dbuffer_p.h
+++ b/src/quick3d/quick3d/items/quick3dbuffer_p.h
@@ -51,9 +51,9 @@
// We mean it.
//
-#include <Qt3DRender/QBuffer>
+#include <Qt3DCore/QBuffer>
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuick/private/qt3dquick_global_p.h>
QT_BEGIN_NAMESPACE
@@ -64,13 +64,11 @@ namespace QV4 {
struct ExecutionEngine;
}
-namespace Qt3DRender {
-
-namespace Render {
+namespace Qt3DCore {
namespace Quick {
-class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DBuffer : public Qt3DRender::QBuffer
+class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DBuffer : public Qt3DCore::QBuffer
{
Q_OBJECT
Q_PROPERTY(QVariant data READ bufferData WRITE setBufferData NOTIFY bufferDataChanged)
@@ -97,9 +95,7 @@ private:
} // Quick
-} // Render
-
-} // Qt3DRender
+} // Qt3DCore
QT_END_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dgeometry.cpp b/src/quick3d/quick3d/items/quick3dgeometry.cpp
index 3f70ea572..8e9e56fab 100644
--- a/src/quick3d/quick3drender/items/quick3dgeometry.cpp
+++ b/src/quick3d/quick3d/items/quick3dgeometry.cpp
@@ -37,12 +37,11 @@
**
****************************************************************************/
-#include <Qt3DQuickRender/private/quick3dgeometry_p.h>
+#include <Qt3DQuick/private/quick3dgeometry_p.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
-namespace Render {
+namespace Qt3DCore {
namespace Quick {
Quick3DGeometry::Quick3DGeometry(QObject *parent)
@@ -50,44 +49,43 @@ Quick3DGeometry::Quick3DGeometry(QObject *parent)
{
}
-QQmlListProperty<Qt3DRender::QAttribute> Quick3DGeometry::attributeList()
+QQmlListProperty<Qt3DCore::QAttribute> Quick3DGeometry::attributeList()
{
- return QQmlListProperty<Qt3DRender::QAttribute>(this, 0,
- &Quick3DGeometry::appendAttribute,
- &Quick3DGeometry::attributesCount,
- &Quick3DGeometry::attributeAt,
- &Quick3DGeometry::clearAttributes);
+ return QQmlListProperty<Qt3DCore::QAttribute>(this, nullptr,
+ &Quick3DGeometry::appendAttribute,
+ &Quick3DGeometry::attributesCount,
+ &Quick3DGeometry::attributeAt,
+ &Quick3DGeometry::clearAttributes);
}
-void Quick3DGeometry::appendAttribute(QQmlListProperty<Qt3DRender::QAttribute> *list, Qt3DRender::QAttribute *attribute)
+void Quick3DGeometry::appendAttribute(QQmlListProperty<Qt3DCore::QAttribute> *list, Qt3DCore::QAttribute *attribute)
{
Quick3DGeometry *geometry = static_cast<Quick3DGeometry *>(list->object);
geometry->m_managedAttributes.append(attribute);
geometry->parentGeometry()->addAttribute(attribute);
}
-Qt3DRender::QAttribute *Quick3DGeometry::attributeAt(QQmlListProperty<Qt3DRender::QAttribute> *list, int index)
+Qt3DCore::QAttribute *Quick3DGeometry::attributeAt(QQmlListProperty<Qt3DCore::QAttribute> *list, int index)
{
Quick3DGeometry *geometry = static_cast<Quick3DGeometry *>(list->object);
return geometry->parentGeometry()->attributes().at(index);
}
-int Quick3DGeometry::attributesCount(QQmlListProperty<Qt3DRender::QAttribute> *list)
+int Quick3DGeometry::attributesCount(QQmlListProperty<Qt3DCore::QAttribute> *list)
{
Quick3DGeometry *geometry = static_cast<Quick3DGeometry *>(list->object);
return geometry->parentGeometry()->attributes().count();
}
-void Quick3DGeometry::clearAttributes(QQmlListProperty<Qt3DRender::QAttribute> *list)
+void Quick3DGeometry::clearAttributes(QQmlListProperty<Qt3DCore::QAttribute> *list)
{
Quick3DGeometry *geometry = static_cast<Quick3DGeometry *>(list->object);
- for (Qt3DRender::QAttribute *attribute : qAsConst(geometry->m_managedAttributes))
+ for (Qt3DCore::QAttribute *attribute : qAsConst(geometry->m_managedAttributes))
geometry->parentGeometry()->removeAttribute(attribute);
geometry->m_managedAttributes.clear();
}
} // namespace Quick
-} // namespace Render
-} // namespace Qt3DRender
+} // namespace Qt3DCore
QT_END_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dgeometry_p.h b/src/quick3d/quick3d/items/quick3dgeometry_p.h
index 19a308076..39bafbea7 100644
--- a/src/quick3d/quick3drender/items/quick3dgeometry_p.h
+++ b/src/quick3d/quick3d/items/quick3dgeometry_p.h
@@ -51,41 +51,39 @@
// We mean it.
//
-#include <Qt3DRender/QGeometry>
+#include <Qt3DCore/QGeometry>
#include <QtQml/QQmlListProperty>
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuick/private/qt3dquick_global_p.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
-namespace Render {
+namespace Qt3DCore {
namespace Quick {
-class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DGeometry : public QObject
+class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DGeometry : public QObject
{
Q_OBJECT
- Q_PROPERTY(QQmlListProperty<Qt3DRender::QAttribute> attributes READ attributeList)
+ Q_PROPERTY(QQmlListProperty<Qt3DCore::QAttribute> attributes READ attributeList)
Q_CLASSINFO("DefaultProperty", "attributes")
public:
- explicit Quick3DGeometry(QObject *parent = 0);
+ explicit Quick3DGeometry(QObject *parent = nullptr);
inline QGeometry *parentGeometry() const { return qobject_cast<QGeometry *>(parent()); }
- QQmlListProperty<Qt3DRender::QAttribute> attributeList();
+ QQmlListProperty<Qt3DCore::QAttribute> attributeList();
private:
- static void appendAttribute(QQmlListProperty<Qt3DRender::QAttribute> *list, Qt3DRender::QAttribute *provider);
- static Qt3DRender::QAttribute *attributeAt(QQmlListProperty<Qt3DRender::QAttribute> *list, int index);
- static int attributesCount(QQmlListProperty<Qt3DRender::QAttribute> *list);
- static void clearAttributes(QQmlListProperty<Qt3DRender::QAttribute> *list);
+ static void appendAttribute(QQmlListProperty<Qt3DCore::QAttribute> *list, Qt3DCore::QAttribute *provider);
+ static Qt3DCore::QAttribute *attributeAt(QQmlListProperty<Qt3DCore::QAttribute> *list, int index);
+ static int attributesCount(QQmlListProperty<Qt3DCore::QAttribute> *list);
+ static void clearAttributes(QQmlListProperty<Qt3DCore::QAttribute> *list);
- QVector<Qt3DRender::QAttribute *> m_managedAttributes;
+ QVector<Qt3DCore::QAttribute *> m_managedAttributes;
};
} // namespace Quick
-} // namespace Render
-} // namespace Qt3DRender
+} // namespace Qt3DCore
QT_END_NAMESPACE
diff --git a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp
index 81144e186..030d5abe5 100644
--- a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp
+++ b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp
@@ -46,23 +46,23 @@ QQuick3DMorphTarget::QQuick3DMorphTarget(QObject *parent)
{
}
-QQmlListProperty<Qt3DRender::QAttribute> QQuick3DMorphTarget::attributes()
+QQmlListProperty<Qt3DCore::QAttribute> QQuick3DMorphTarget::attributes()
{
- return QQmlListProperty<Qt3DRender::QAttribute>(this, 0,
+ return QQmlListProperty<Qt3DCore::QAttribute>(this, 0,
&QQuick3DMorphTarget::appendAttribute,
&QQuick3DMorphTarget::attributeCount,
&QQuick3DMorphTarget::attributeAt,
&QQuick3DMorphTarget::clearAttributes);
}
-void QQuick3DMorphTarget::appendAttribute(QQmlListProperty<Qt3DRender::QAttribute> *list, Qt3DRender::QAttribute *bar)
+void QQuick3DMorphTarget::appendAttribute(QQmlListProperty<Qt3DCore::QAttribute> *list, Qt3DCore::QAttribute *bar)
{
QQuick3DMorphTarget *target = qobject_cast<QQuick3DMorphTarget *>(list->object);
if (target)
target->parentMorphTarget()->addAttribute(bar);
}
-int QQuick3DMorphTarget::attributeCount(QQmlListProperty<Qt3DRender::QAttribute> *list)
+int QQuick3DMorphTarget::attributeCount(QQmlListProperty<Qt3DCore::QAttribute> *list)
{
QQuick3DMorphTarget *target = qobject_cast<QQuick3DMorphTarget *>(list->object);
if (target)
@@ -70,19 +70,19 @@ int QQuick3DMorphTarget::attributeCount(QQmlListProperty<Qt3DRender::QAttribute>
return 0;
}
-Qt3DRender::QAttribute *QQuick3DMorphTarget::attributeAt(QQmlListProperty<Qt3DRender::QAttribute> *list, int index)
+Qt3DCore::QAttribute *QQuick3DMorphTarget::attributeAt(QQmlListProperty<Qt3DCore::QAttribute> *list, int index)
{
QQuick3DMorphTarget *target = qobject_cast<QQuick3DMorphTarget *>(list->object);
if (target)
- return qobject_cast<Qt3DRender::QAttribute *>(target->parentMorphTarget()->attributeList().at(index));
+ return qobject_cast<Qt3DCore::QAttribute *>(target->parentMorphTarget()->attributeList().at(index));
return nullptr;
}
-void QQuick3DMorphTarget::clearAttributes(QQmlListProperty<Qt3DRender::QAttribute> *list)
+void QQuick3DMorphTarget::clearAttributes(QQmlListProperty<Qt3DCore::QAttribute> *list)
{
QQuick3DMorphTarget *target = qobject_cast<QQuick3DMorphTarget *>(list->object);
if (target) {
- QVector<Qt3DRender::QAttribute *> emptyList;
+ QVector<Qt3DCore::QAttribute *> emptyList;
target->parentMorphTarget()->setAttributes(emptyList);
}
}
diff --git a/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h b/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h
index 5ca783e6b..d68a795e9 100644
--- a/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h
+++ b/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h
@@ -60,21 +60,21 @@ namespace Quick {
class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DMorphTarget : public QObject
{
Q_OBJECT
- Q_PROPERTY(QQmlListProperty<Qt3DRender::QAttribute> attributes READ attributes)
+ Q_PROPERTY(QQmlListProperty<Qt3DCore::QAttribute> attributes READ attributes)
public:
QQuick3DMorphTarget(QObject *parent = nullptr);
inline QMorphTarget *parentMorphTarget() const { return qobject_cast<QMorphTarget *>(parent()); }
- QQmlListProperty<Qt3DRender::QAttribute> attributes();
+ QQmlListProperty<Qt3DCore::QAttribute> attributes();
private:
- static void appendAttribute(QQmlListProperty<Qt3DRender::QAttribute> *list, Qt3DRender::QAttribute *bar);
- static Qt3DRender::QAttribute *attributeAt(QQmlListProperty<Qt3DRender::QAttribute> *list, int index);
- static int attributeCount(QQmlListProperty<Qt3DRender::QAttribute> *list);
- static void clearAttributes(QQmlListProperty<Qt3DRender::QAttribute> *list);
+ static void appendAttribute(QQmlListProperty<Qt3DCore::QAttribute> *list, Qt3DCore::QAttribute *bar);
+ static Qt3DCore::QAttribute *attributeAt(QQmlListProperty<Qt3DCore::QAttribute> *list, int index);
+ static int attributeCount(QQmlListProperty<Qt3DCore::QAttribute> *list);
+ static void clearAttributes(QQmlListProperty<Qt3DCore::QAttribute> *list);
};
} // namespace Quick
diff --git a/src/quick3d/quick3drender/items/items.pri b/src/quick3d/quick3drender/items/items.pri
index e264624b3..4bfb1ae4a 100644
--- a/src/quick3d/quick3drender/items/items.pri
+++ b/src/quick3d/quick3drender/items/items.pri
@@ -1,8 +1,6 @@
HEADERS += \
$$PWD/quick3dtechniquefilter_p.h \
- $$PWD/quick3dbuffer_p.h \
$$PWD/quick3deffect_p.h \
- $$PWD/quick3dgeometry_p.h \
$$PWD/quick3dlayerfilter_p.h \
$$PWD/quick3dmaterial_p.h \
$$PWD/quick3drenderpass_p.h \
@@ -40,8 +38,6 @@ SOURCES += \
$$PWD/quick3dshaderdataarray.cpp \
$$PWD/quick3dstateset.cpp \
$$PWD/quick3drendertargetselector.cpp \
- $$PWD/quick3dgeometry.cpp \
- $$PWD/quick3dbuffer.cpp \
$$PWD/quick3drendertargetoutput.cpp \
$$PWD/quick3dmemorybarrier.cpp \
$$PWD/quick3draycaster.cpp \
diff --git a/src/quick3d/quick3dscene2d/items/scene2d.cpp b/src/quick3d/quick3dscene2d/items/scene2d.cpp
index dcc99ed8c..2b0a6580d 100644
--- a/src/quick3d/quick3dscene2d/items/scene2d.cpp
+++ b/src/quick3d/quick3dscene2d/items/scene2d.cpp
@@ -480,7 +480,7 @@ void Scene2D::handlePickEvent(int type, const Qt3DRender::QPickEvent *ev)
CoordinateReader reader(renderer()->nodeManagers());
if (reader.setGeometry(entity->renderComponent<GeometryRenderer>(),
- QAttribute::defaultTextureCoordinateAttributeName())) {
+ Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName())) {
Vector4D c0 = reader.getCoordinate(pickTriangle->vertex1Index());
Vector4D c1 = reader.getCoordinate(pickTriangle->vertex2Index());
Vector4D c2 = reader.getCoordinate(pickTriangle->vertex3Index());
diff --git a/src/render/backend/bufferutils_p.h b/src/render/backend/bufferutils_p.h
index ea783df0d..83787b6bc 100644
--- a/src/render/backend/bufferutils_p.h
+++ b/src/render/backend/bufferutils_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <Qt3DRender/QAttribute>
+#include <Qt3DCore/QAttribute>
#include <QByteArray>
QT_BEGIN_NAMESPACE
@@ -69,7 +69,7 @@ class Buffer;
struct BufferInfo
{
BufferInfo()
- : type(QAttribute::VertexBaseType::Float)
+ : type(Qt3DCore::QAttribute::VertexBaseType::Float)
, dataSize(0)
, count(0)
, byteStride(0)
@@ -79,7 +79,7 @@ struct BufferInfo
{}
QByteArray data;
- QAttribute::VertexBaseType type;
+ Qt3DCore::QAttribute::VertexBaseType type;
uint dataSize;
uint count;
uint byteStride;
@@ -91,17 +91,17 @@ struct BufferInfo
namespace BufferTypeInfo {
- template <QAttribute::VertexBaseType> struct EnumToType;
- template <> struct EnumToType<QAttribute::Byte> { typedef const char type; };
- template <> struct EnumToType<QAttribute::UnsignedByte> { typedef const uchar type; };
- template <> struct EnumToType<QAttribute::Short> { typedef const short type; };
- template <> struct EnumToType<QAttribute::UnsignedShort> { typedef const ushort type; };
- template <> struct EnumToType<QAttribute::Int> { typedef const int type; };
- template <> struct EnumToType<QAttribute::UnsignedInt> { typedef const uint type; };
- template <> struct EnumToType<QAttribute::Float> { typedef const float type; };
- template <> struct EnumToType<QAttribute::Double> { typedef const double type; };
-
- template<QAttribute::VertexBaseType v>
+ template <Qt3DCore::QAttribute::VertexBaseType> struct EnumToType;
+ template <> struct EnumToType<Qt3DCore::QAttribute::Byte> { typedef const char type; };
+ template <> struct EnumToType<Qt3DCore::QAttribute::UnsignedByte> { typedef const uchar type; };
+ template <> struct EnumToType<Qt3DCore::QAttribute::Short> { typedef const short type; };
+ template <> struct EnumToType<Qt3DCore::QAttribute::UnsignedShort> { typedef const ushort type; };
+ template <> struct EnumToType<Qt3DCore::QAttribute::Int> { typedef const int type; };
+ template <> struct EnumToType<Qt3DCore::QAttribute::UnsignedInt> { typedef const uint type; };
+ template <> struct EnumToType<Qt3DCore::QAttribute::Float> { typedef const float type; };
+ template <> struct EnumToType<Qt3DCore::QAttribute::Double> { typedef const double type; };
+
+ template<Qt3DCore::QAttribute::VertexBaseType v>
typename EnumToType<v>::type *castToType(const QByteArray &u, uint byteOffset)
{
return reinterpret_cast< typename EnumToType<v>::type *>(u.constData() + byteOffset);
diff --git a/src/render/backend/buffervisitor_p.h b/src/render/backend/buffervisitor_p.h
index f3863f0a3..6d916208b 100644
--- a/src/render/backend/buffervisitor_p.h
+++ b/src/render/backend/buffervisitor_p.h
@@ -52,7 +52,7 @@
//
#include <Qt3DCore/qnodeid.h>
-#include <Qt3DRender/QAttribute>
+#include <Qt3DCore/qattribute.h>
#include <Qt3DRender/private/trianglesvisitor_p.h>
#include <Qt3DRender/private/attribute_p.h>
#include <Qt3DRender/private/buffer_p.h>
@@ -72,7 +72,7 @@ namespace Qt3DRender {
namespace Render {
-template <typename ValueType, QAttribute::VertexBaseType VertexBaseType, uint dataSize>
+template <typename ValueType, Qt3DCore::QAttribute::VertexBaseType VertexBaseType, uint dataSize>
class Q_AUTOTEST_EXPORT BufferVisitor
{
public:
@@ -137,20 +137,20 @@ public:
if (indexAttribute) {
auto indexData = m_manager->lookupResource<Buffer, BufferManager>(indexAttribute->bufferId())->data();
switch (indexAttribute->vertexBaseType()) {
- case QAttribute::UnsignedShort: {
- auto indexBuffer = BufferTypeInfo::castToType<QAttribute::UnsignedShort>(indexData, indexAttribute->byteOffset());
+ case Qt3DCore::QAttribute::UnsignedShort: {
+ auto indexBuffer = BufferTypeInfo::castToType<Qt3DCore::QAttribute::UnsignedShort>(indexData, indexAttribute->byteOffset());
traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
primitiveRestartEnabled, primitiveRestartIndex);
break;
}
- case QAttribute::UnsignedInt: {
- auto indexBuffer = BufferTypeInfo::castToType<QAttribute::UnsignedInt>(indexData, indexAttribute->byteOffset());
+ case Qt3DCore::QAttribute::UnsignedInt: {
+ auto indexBuffer = BufferTypeInfo::castToType<Qt3DCore::QAttribute::UnsignedInt>(indexData, indexAttribute->byteOffset());
traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
primitiveRestartEnabled, primitiveRestartIndex);
break;
}
- case QAttribute::UnsignedByte: {
- auto indexBuffer = BufferTypeInfo::castToType<QAttribute::UnsignedByte>(indexData, indexAttribute->byteOffset());
+ case Qt3DCore::QAttribute::UnsignedByte: {
+ auto indexBuffer = BufferTypeInfo::castToType<Qt3DCore::QAttribute::UnsignedByte>(indexData, indexAttribute->byteOffset());
traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
primitiveRestartEnabled, primitiveRestartIndex);
break;
@@ -292,7 +292,7 @@ protected:
NodeManagers *m_manager;
};
-typedef BufferVisitor<float, QAttribute::Float, 3> Buffer3fVisitor;
+typedef BufferVisitor<float, Qt3DCore::QAttribute::Float, 3> Buffer3fVisitor;
} // namespace Render
diff --git a/src/render/backend/trianglesvisitor.cpp b/src/render/backend/trianglesvisitor.cpp
index a58f2d20b..4cdf8a2bf 100644
--- a/src/render/backend/trianglesvisitor.cpp
+++ b/src/render/backend/trianglesvisitor.cpp
@@ -53,6 +53,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt3DCore;
+
namespace Qt3DRender {
namespace Render {
diff --git a/src/render/backend/trianglesvisitor_p.h b/src/render/backend/trianglesvisitor_p.h
index d05eaef09..e8ac9bf27 100644
--- a/src/render/backend/trianglesvisitor_p.h
+++ b/src/render/backend/trianglesvisitor_p.h
@@ -52,7 +52,6 @@
//
#include <Qt3DCore/qnodeid.h>
-#include <Qt3DRender/QAttribute>
#include <Qt3DRender/private/bufferutils_p.h>
#include <Qt3DCore/private/vector3d_p.h>
#include <Qt3DCore/private/vector4d_p.h>
diff --git a/src/render/backend/visitorutils_p.h b/src/render/backend/visitorutils_p.h
index 14183e11b..3ea848c6b 100644
--- a/src/render/backend/visitorutils_p.h
+++ b/src/render/backend/visitorutils_p.h
@@ -61,17 +61,17 @@ namespace Render {
namespace Visitor {
-template <QAttribute::VertexBaseType> struct EnumToType;
-template <> struct EnumToType<QAttribute::Byte> { typedef const char type; };
-template <> struct EnumToType<QAttribute::UnsignedByte> { typedef const uchar type; };
-template <> struct EnumToType<QAttribute::Short> { typedef const short type; };
-template <> struct EnumToType<QAttribute::UnsignedShort> { typedef const ushort type; };
-template <> struct EnumToType<QAttribute::Int> { typedef const int type; };
-template <> struct EnumToType<QAttribute::UnsignedInt> { typedef const uint type; };
-template <> struct EnumToType<QAttribute::Float> { typedef const float type; };
-template <> struct EnumToType<QAttribute::Double> { typedef const double type; };
-
-template<QAttribute::VertexBaseType v>
+template <Qt3DCore::QAttribute::VertexBaseType> struct EnumToType;
+template <> struct EnumToType<Qt3DCore::QAttribute::Byte> { typedef const char type; };
+template <> struct EnumToType<Qt3DCore::QAttribute::UnsignedByte> { typedef const uchar type; };
+template <> struct EnumToType<Qt3DCore::QAttribute::Short> { typedef const short type; };
+template <> struct EnumToType<Qt3DCore::QAttribute::UnsignedShort> { typedef const ushort type; };
+template <> struct EnumToType<Qt3DCore::QAttribute::Int> { typedef const int type; };
+template <> struct EnumToType<Qt3DCore::QAttribute::UnsignedInt> { typedef const uint type; };
+template <> struct EnumToType<Qt3DCore::QAttribute::Float> { typedef const float type; };
+template <> struct EnumToType<Qt3DCore::QAttribute::Double> { typedef const double type; };
+
+template<Qt3DCore::QAttribute::VertexBaseType v>
inline typename EnumToType<v>::type *castToType(const QByteArray &u, uint byteOffset)
{
return reinterpret_cast< typename EnumToType<v>::type *>(u.constData() + byteOffset);
@@ -81,21 +81,21 @@ template<typename Func>
void processBuffer(const BufferInfo &info, Func &f)
{
switch (info.type) {
- case QAttribute::Byte: f(info, castToType<QAttribute::Byte>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::Byte: f(info, castToType<Qt3DCore::QAttribute::Byte>(info.data, info.byteOffset));
return;
- case QAttribute::UnsignedByte: f(info, castToType<QAttribute::UnsignedByte>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::UnsignedByte: f(info, castToType<Qt3DCore::QAttribute::UnsignedByte>(info.data, info.byteOffset));
return;
- case QAttribute::Short: f(info, castToType<QAttribute::Short>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::Short: f(info, castToType<Qt3DCore::QAttribute::Short>(info.data, info.byteOffset));
return;
- case QAttribute::UnsignedShort: f(info, castToType<QAttribute::UnsignedShort>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::UnsignedShort: f(info, castToType<Qt3DCore::QAttribute::UnsignedShort>(info.data, info.byteOffset));
return;
- case QAttribute::Int: f(info, castToType<QAttribute::Int>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::Int: f(info, castToType<Qt3DCore::QAttribute::Int>(info.data, info.byteOffset));
return;
- case QAttribute::UnsignedInt: f(info, castToType<QAttribute::UnsignedInt>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::UnsignedInt: f(info, castToType<Qt3DCore::QAttribute::UnsignedInt>(info.data, info.byteOffset));
return;
- case QAttribute::Float: f(info, castToType<QAttribute::Float>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::Float: f(info, castToType<Qt3DCore::QAttribute::Float>(info.data, info.byteOffset));
return;
- case QAttribute::Double: f(info, castToType<QAttribute::Double>(info.data, info.byteOffset));
+ case Qt3DCore::QAttribute::Double: f(info, castToType<Qt3DCore::QAttribute::Double>(info.data, info.byteOffset));
return;
default:
return;
@@ -119,9 +119,9 @@ void visitPrimitives(NodeManagers *manager, const GeometryRenderer *renderer, Vi
for (const Qt3DCore::QNodeId attrId : attrIds) {
attribute = manager->lookupResource<Attribute, AttributeManager>(attrId);
if (attribute){
- if (!positionAttribute && attribute->name() == QAttribute::defaultPositionAttributeName())
+ if (!positionAttribute && attribute->name() == Qt3DCore::QAttribute::defaultPositionAttributeName())
positionAttribute = attribute;
- else if (attribute->attributeType() == QAttribute::IndexAttribute)
+ else if (attribute->attributeType() == Qt3DCore::QAttribute::IndexAttribute)
indexAttribute = attribute;
}
}
diff --git a/src/render/framegraph/qbuffercapture.h b/src/render/framegraph/qbuffercapture.h
index e5073a308..5d148f2bf 100644
--- a/src/render/framegraph/qbuffercapture.h
+++ b/src/render/framegraph/qbuffercapture.h
@@ -41,7 +41,7 @@
#define QT3DRENDER_QBUFFERCAPTURE_H
#include <Qt3DRender/QFrameGraphNode>
-#include <Qt3DRender/QBuffer>
+#include <Qt3DCore/QBuffer>
#include <QtCore/QByteArray>
QT_BEGIN_NAMESPACE
diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp
index e929f532f..2e9b8e323 100644
--- a/src/render/frontend/qrenderaspect.cpp
+++ b/src/render/frontend/qrenderaspect.cpp
@@ -70,9 +70,6 @@
#include <Qt3DRender/qnodraw.h>
#include <Qt3DRender/qnopicking.h>
#include <Qt3DRender/qcameralens.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DRender/qobjectpicker.h>
#include <Qt3DRender/qraycaster.h>
@@ -170,7 +167,9 @@
#include <Qt3DCore/qentity.h>
#include <Qt3DCore/qtransform.h>
-
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DCore/qnode.h>
#include <Qt3DCore/QAspectEngine>
#include <Qt3DCore/private/qservicelocator_p.h>
@@ -267,13 +266,14 @@ void QRenderAspectPrivate::registerBackendTypes()
{
Q_Q(QRenderAspect);
- qRegisterMetaType<Qt3DRender::QBuffer*>();
+ qRegisterMetaType<Qt3DCore::QBuffer*>();
+ qRegisterMetaType<Qt3DCore::QJoint*>();
+
qRegisterMetaType<Qt3DRender::QEffect*>();
qRegisterMetaType<Qt3DRender::QFrameGraphNode *>();
qRegisterMetaType<Qt3DRender::QCamera*>();
qRegisterMetaType<Qt3DRender::QShaderProgram*>();
qRegisterMetaType<Qt3DRender::QViewport*>();
- qRegisterMetaType<Qt3DCore::QJoint*>();
q->registerBackendType<Qt3DCore::QEntity>(QSharedPointer<Render::RenderEntityFunctor>::create(m_renderer, m_nodeManagers));
q->registerBackendType<Qt3DCore::QTransform>(QSharedPointer<Render::NodeFunctor<Render::Transform, Render::TransformManager> >::create(m_renderer));
@@ -289,8 +289,8 @@ void QRenderAspectPrivate::registerBackendTypes()
q->registerBackendType<QRenderState>(QSharedPointer<Render::NodeFunctor<Render::RenderStateNode, Render::RenderStateManager> >::create(m_renderer));
// Geometry + Compute
- q->registerBackendType<QAttribute>(QSharedPointer<Render::NodeFunctor<Render::Attribute, Render::AttributeManager> >::create(m_renderer));
- q->registerBackendType<QBuffer>(QSharedPointer<Render::BufferFunctor>::create(m_renderer, m_nodeManagers->bufferManager()));
+ q->registerBackendType<Qt3DCore::QAttribute>(QSharedPointer<Render::NodeFunctor<Render::Attribute, Render::AttributeManager> >::create(m_renderer));
+ q->registerBackendType<Qt3DCore::QBuffer>(QSharedPointer<Render::BufferFunctor>::create(m_renderer, m_nodeManagers->bufferManager()));
q->registerBackendType<QComputeCommand>(QSharedPointer<Render::NodeFunctor<Render::ComputeCommand, Render::ComputeCommandManager> >::create(m_renderer));
q->registerBackendType<QGeometry>(QSharedPointer<Render::NodeFunctor<Render::Geometry, Render::GeometryManager> >::create(m_renderer));
q->registerBackendType<QGeometryRenderer>(QSharedPointer<Render::GeometryRendererFunctor>::create(m_renderer, m_nodeManagers->geometryRendererManager()));
@@ -369,8 +369,8 @@ void QRenderAspectPrivate::unregisterBackendTypes()
unregisterBackendType<QRenderState>();
// Geometry + Compute
- unregisterBackendType<QAttribute>();
- unregisterBackendType<QBuffer>();
+ unregisterBackendType<Qt3DCore::QAttribute>();
+ unregisterBackendType<Qt3DCore::QBuffer>();
unregisterBackendType<QComputeCommand>();
unregisterBackendType<QGeometry>();
unregisterBackendType<QGeometryRenderer>();
diff --git a/src/render/frontend/render-frontend.pri b/src/render/frontend/render-frontend.pri
index 694b5cfc1..934672a01 100644
--- a/src/render/frontend/render-frontend.pri
+++ b/src/render/frontend/render-frontend.pri
@@ -1,7 +1,6 @@
INCLUDEPATH += $$PWD
HEADERS += \
- $$PWD/qabstractfunctor.h \
$$PWD/qrenderaspect.h \
$$PWD/qrenderaspect_p.h \
$$PWD/qlayer.h \
@@ -33,7 +32,6 @@ HEADERS += \
$$PWD/qrendercapabilities_p.h
SOURCES += \
- $$PWD/qabstractfunctor.cpp \
$$PWD/qrenderaspect.cpp \
$$PWD/sphere.cpp \
$$PWD/qlayer.cpp \
diff --git a/src/render/geometry/attribute.cpp b/src/render/geometry/attribute.cpp
index de44c5fe3..b9e53b483 100644
--- a/src/render/geometry/attribute.cpp
+++ b/src/render/geometry/attribute.cpp
@@ -38,8 +38,7 @@
****************************************************************************/
#include "attribute_p.h"
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/private/qattribute_p.h>
+#include <Qt3DCore/private/qattribute_p.h>
#include <Qt3DRender/private/stringtoint_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/render/geometry/attribute_p.h b/src/render/geometry/attribute_p.h
index 87b3cbb4f..af776ae2c 100644
--- a/src/render/geometry/attribute_p.h
+++ b/src/render/geometry/attribute_p.h
@@ -52,7 +52,7 @@
//
#include <Qt3DRender/private/backendnode_p.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qattribute.h>
QT_BEGIN_NAMESPACE
@@ -73,13 +73,13 @@ public:
inline Qt3DCore::QNodeId bufferId() const { return m_bufferId; }
inline QString name() const { return m_name; }
inline int nameId() const { return m_nameId; }
- inline QAttribute::VertexBaseType vertexBaseType() const { return m_vertexBaseType; }
+ inline Qt3DCore::QAttribute::VertexBaseType vertexBaseType() const { return m_vertexBaseType; }
inline uint vertexSize() const { return m_vertexSize; }
inline uint count() const { return m_count; }
inline uint byteStride() const { return m_byteStride; }
inline uint byteOffset() const { return m_byteOffset; }
inline uint divisor() const { return m_divisor; }
- inline QAttribute::AttributeType attributeType() const { return m_attributeType; }
+ inline Qt3DCore::QAttribute::AttributeType attributeType() const { return m_attributeType; }
inline bool isDirty() const { return m_attributeDirty; }
void unsetDirty();
@@ -87,13 +87,13 @@ private:
Qt3DCore::QNodeId m_bufferId;
QString m_name;
int m_nameId;
- QAttribute::VertexBaseType m_vertexBaseType;
+ Qt3DCore::QAttribute::VertexBaseType m_vertexBaseType;
uint m_vertexSize;
uint m_count;
uint m_byteStride;
uint m_byteOffset;
uint m_divisor;
- QAttribute::AttributeType m_attributeType;
+ Qt3DCore::QAttribute::AttributeType m_attributeType;
bool m_attributeDirty;
};
diff --git a/src/render/geometry/buffer.cpp b/src/render/geometry/buffer.cpp
index 5b577b546..f7a1f376c 100644
--- a/src/render/geometry/buffer.cpp
+++ b/src/render/geometry/buffer.cpp
@@ -38,21 +38,19 @@
****************************************************************************/
#include "buffer_p.h"
+#include <Qt3DCore/private/qbuffer_p.h>
#include <Qt3DRender/private/buffermanager_p.h>
-#include <Qt3DRender/private/qbuffer_p.h>
QT_BEGIN_NAMESPACE
-using namespace Qt3DCore;
-
namespace Qt3DRender {
namespace Render {
Buffer::Buffer()
: BackendNode(QBackendNode::ReadWrite)
- , m_usage(QBuffer::StaticDraw)
+ , m_usage(Qt3DCore::QBuffer::StaticDraw)
, m_bufferDirty(false)
- , m_access(QBuffer::Write)
+ , m_access(Qt3DCore::QBuffer::Write)
, m_manager(nullptr)
{
// Maybe it could become read write if we want to inform
@@ -65,11 +63,11 @@ Buffer::~Buffer()
void Buffer::cleanup()
{
- m_usage = QBuffer::StaticDraw;
+ m_usage = Qt3DCore::QBuffer::StaticDraw;
m_data.clear();
m_bufferUpdates.clear();
m_bufferDirty = false;
- m_access = QBuffer::Write;
+ m_access = Qt3DCore::QBuffer::Write;
}
@@ -90,16 +88,16 @@ void Buffer::forceDataUpload()
{
// We push back an update with offset = -1
// As this is the way to force data to be loaded
- QBufferUpdate updateNewData;
+ Qt3DCore::QBufferUpdate updateNewData;
updateNewData.offset = -1;
m_bufferUpdates.clear(); //previous updates are pointless
m_bufferUpdates.push_back(updateNewData);
}
-void Buffer::syncFromFrontEnd(const QNode *frontEnd, bool firstTime)
+void Buffer::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime)
{
BackendNode::syncFromFrontEnd(frontEnd, firstTime);
- const QBuffer *node = qobject_cast<const QBuffer *>(frontEnd);
+ const Qt3DCore::QBuffer *node = qobject_cast<const Qt3DCore::QBuffer *>(frontEnd);
if (!node)
return;
@@ -128,17 +126,17 @@ void Buffer::syncFromFrontEnd(const QNode *frontEnd, bool firstTime)
// if we enter this code block, there's no problem in actually
// ignoring the partial updates
if (v.isValid())
- const_cast<QBuffer *>(node)->setProperty("QT3D_updateData", {});
+ const_cast<Qt3DCore::QBuffer *>(node)->setProperty("QT3D_updateData", {});
if (dirty && !m_data.isEmpty())
forceDataUpload();
} else if (v.isValid()) {
// Apply partial updates and record them to allow partial upload to the GPU
- Qt3DRender::QBufferUpdate updateData = v.value<Qt3DRender::QBufferUpdate>();
+ Qt3DCore::QBufferUpdate updateData = v.value<Qt3DCore::QBufferUpdate>();
m_data.replace(updateData.offset, updateData.data.size(), updateData.data);
m_bufferUpdates.push_back(updateData);
m_bufferDirty = true;
- const_cast<QBuffer *>(node)->setProperty("QT3D_updateData", {});
+ const_cast<Qt3DCore::QBuffer *>(node)->setProperty("QT3D_updateData", {});
}
}
markDirty(AbstractRenderer::BuffersDirty);
diff --git a/src/render/geometry/buffer_p.h b/src/render/geometry/buffer_p.h
index c2e40ed88..28600581d 100644
--- a/src/render/geometry/buffer_p.h
+++ b/src/render/geometry/buffer_p.h
@@ -53,14 +53,15 @@
#include <QtCore>
#include <Qt3DRender/private/backendnode_p.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qbuffer.h>
QT_BEGIN_NAMESPACE
-namespace Qt3DRender {
-
-struct QBufferUpdate;
+namespace Qt3DCore {
+ struct QBufferUpdate;
+}
+namespace Qt3DRender {
namespace Render {
class BufferManager;
@@ -76,21 +77,21 @@ public:
void setManager(BufferManager *manager);
void updateDataFromGPUToCPU(QByteArray data);
- inline QBuffer::UsageType usage() const { return m_usage; }
+ inline Qt3DCore::QBuffer::UsageType usage() const { return m_usage; }
inline QByteArray data() const { return m_data; }
- inline QVector<Qt3DRender::QBufferUpdate> &pendingBufferUpdates() { return m_bufferUpdates; }
+ inline QVector<Qt3DCore::QBufferUpdate> &pendingBufferUpdates() { return m_bufferUpdates; }
inline bool isDirty() const { return m_bufferDirty; }
- inline QBuffer::AccessType access() const { return m_access; }
+ inline Qt3DCore::QBuffer::AccessType access() const { return m_access; }
void unsetDirty();
private:
void forceDataUpload();
- QBuffer::UsageType m_usage;
+ Qt3DCore::QBuffer::UsageType m_usage;
QByteArray m_data;
- QVector<Qt3DRender::QBufferUpdate> m_bufferUpdates;
+ QVector<Qt3DCore::QBufferUpdate> m_bufferUpdates;
bool m_bufferDirty;
- QBuffer::AccessType m_access;
+ Qt3DCore::QBuffer::AccessType m_access;
BufferManager *m_manager;
};
@@ -107,7 +108,6 @@ private:
};
} // namespace Render
-
} // namespace Qt3DRender
QT_END_NAMESPACE
diff --git a/src/render/geometry/geometry.cpp b/src/render/geometry/geometry.cpp
index c70195ee0..22154e4f5 100644
--- a/src/render/geometry/geometry.cpp
+++ b/src/render/geometry/geometry.cpp
@@ -38,9 +38,9 @@
****************************************************************************/
#include "geometry_p.h"
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qgeometry.h>
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qgeometry.h>
#include <algorithm>
diff --git a/src/render/geometry/geometry.pri b/src/render/geometry/geometry.pri
index 88cc81b51..475f406d5 100644
--- a/src/render/geometry/geometry.pri
+++ b/src/render/geometry/geometry.pri
@@ -7,17 +7,10 @@ HEADERS += \
$$PWD/geometry_p.h \
$$PWD/geometryrenderer_p.h \
$$PWD/geometryrenderermanager_p.h \
- $$PWD/qbuffer.h \
- $$PWD/qbuffer_p.h \
- $$PWD/qgeometry.h \
- $$PWD/qgeometry_p.h \
- $$PWD/qgeometryfactory_p.h \
$$PWD/qgeometryrenderer.h \
$$PWD/qgeometryrenderer_p.h \
$$PWD/qmesh.h \
$$PWD/qmesh_p.h \
- $$PWD/qattribute_p.h \
- $$PWD/qattribute.h \
$$PWD/armature_p.h \
$$PWD/skeleton_p.h \
$$PWD/gltfskeletonloader_p.h \
@@ -31,11 +24,8 @@ SOURCES += \
$$PWD/geometry.cpp \
$$PWD/geometryrenderer.cpp \
$$PWD/geometryrenderermanager.cpp \
- $$PWD/qbuffer.cpp \
- $$PWD/qgeometry.cpp \
$$PWD/qgeometryrenderer.cpp \
$$PWD/qmesh.cpp \
- $$PWD/qattribute.cpp \
$$PWD/armature.cpp \
$$PWD/skeleton.cpp \
$$PWD/gltfskeletonloader.cpp \
diff --git a/src/render/geometry/geometryrenderer.cpp b/src/render/geometry/geometryrenderer.cpp
index 7a726e03f..6f6227ba7 100644
--- a/src/render/geometry/geometryrenderer.cpp
+++ b/src/render/geometry/geometryrenderer.cpp
@@ -142,7 +142,7 @@ void GeometryRenderer::syncFromFrontEnd(const QNode *frontEnd, bool firstTime)
if (m_geometryFactory && m_manager != nullptr) {
m_manager->addDirtyGeometryRenderer(peerId());
- const bool isQMeshFunctor = m_geometryFactory->id() == Qt3DRender::functorTypeId<MeshLoaderFunctor>();
+ const bool isQMeshFunctor = m_geometryFactory->id() == Qt3DCore::functorTypeId<MeshLoaderFunctor>();
if (isQMeshFunctor) {
const QMesh *meshNode = static_cast<const QMesh *>(node);
QMeshPrivate *dmeshNode = QMeshPrivate::get(const_cast<QMesh *>(meshNode));
@@ -159,7 +159,7 @@ GeometryFunctorResult GeometryRenderer::executeFunctor()
Q_ASSERT(m_geometryFactory);
// What kind of functor are we dealing with?
- const bool isQMeshFunctor = m_geometryFactory->id() == Qt3DRender::functorTypeId<MeshLoaderFunctor>();
+ const bool isQMeshFunctor = m_geometryFactory->id() == Qt3DCore::functorTypeId<MeshLoaderFunctor>();
if (isQMeshFunctor) {
QSharedPointer<MeshLoaderFunctor> meshLoader = qSharedPointerCast<MeshLoaderFunctor>(m_geometryFactory);
@@ -171,7 +171,7 @@ GeometryFunctorResult GeometryRenderer::executeFunctor()
if (meshLoader->downloaderService() == nullptr) {
Qt3DCore::QServiceLocator *services = m_renderer->services();
meshLoader->setDownloaderService(services->service<Qt3DCore::QDownloadHelperService>(Qt3DCore::QServiceLocator::DownloadHelperService));
- };
+ }
}
// Load geometry
diff --git a/src/render/geometry/geometryrenderer_p.h b/src/render/geometry/geometryrenderer_p.h
index c5908ca01..87a289f7d 100644
--- a/src/render/geometry/geometryrenderer_p.h
+++ b/src/render/geometry/geometryrenderer_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
+#include <Qt3DCore/private/qgeometryfactory_p.h>
#include <Qt3DRender/private/backendnode_p.h>
-#include <Qt3DRender/private/qgeometryfactory_p.h>
#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DRender/qmesh.h>
@@ -69,7 +69,7 @@ class GeometryRendererManager;
struct GeometryFunctorResult
{
- QGeometry *geometry;
+ Qt3DCore::QGeometry *geometry;
QMesh::Status status;
};
@@ -96,7 +96,7 @@ public:
inline bool primitiveRestartEnabled() const { return m_primitiveRestartEnabled; }
inline QGeometryRenderer::PrimitiveType primitiveType() const { return m_primitiveType; }
inline bool isDirty() const { return m_dirty; }
- inline QGeometryFactoryPtr geometryFactory() const { return m_geometryFactory; }
+ inline Qt3DCore::QGeometryFactoryPtr geometryFactory() const { return m_geometryFactory; }
void unsetDirty();
// Build triangle data Job thread
@@ -117,7 +117,7 @@ private:
bool m_primitiveRestartEnabled;
QGeometryRenderer::PrimitiveType m_primitiveType;
bool m_dirty;
- QGeometryFactoryPtr m_geometryFactory;
+ Qt3DCore::QGeometryFactoryPtr m_geometryFactory;
GeometryRendererManager *m_manager;
QVector<RayCasting::QBoundingVolume *> m_triangleVolumes;
};
diff --git a/src/render/geometry/gltfskeletonloader.cpp b/src/render/geometry/gltfskeletonloader.cpp
index d5d344ce1..ce3b3a5f2 100644
--- a/src/render/geometry/gltfskeletonloader.cpp
+++ b/src/render/geometry/gltfskeletonloader.cpp
@@ -52,6 +52,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt3DCore;
+
namespace {
void jsonArrayToSqt(const QJsonArray &jsonArray, Qt3DCore::Sqt &sqt)
diff --git a/src/render/geometry/gltfskeletonloader_p.h b/src/render/geometry/gltfskeletonloader_p.h
index b2a175ecb..b3e86a86c 100644
--- a/src/render/geometry/gltfskeletonloader_p.h
+++ b/src/render/geometry/gltfskeletonloader_p.h
@@ -49,7 +49,7 @@
//
#include <QtGlobal>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qattribute.h>
#include <QtGui/qmatrix4x4.h>
#include <QtCore/qjsondocument.h>
@@ -96,7 +96,7 @@ class GLTFSkeletonLoader
explicit AccessorData(const QJsonObject &json);
int bufferViewIndex;
- QAttribute::VertexBaseType type;
+ Qt3DCore::QAttribute::VertexBaseType type;
uint dataSize;
int count;
int byteOffset;
@@ -139,8 +139,8 @@ public:
SkeletonData createSkeleton(const QString &skeletonName);
private:
- static QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
- static uint accessorTypeSize(QAttribute::VertexBaseType componentType);
+ static Qt3DCore::QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
+ static uint accessorTypeSize(Qt3DCore::QAttribute::VertexBaseType componentType);
static uint accessorDataSizeFromJson(const QString &type);
struct RawData
diff --git a/src/render/geometry/qgeometryrenderer.cpp b/src/render/geometry/qgeometryrenderer.cpp
index 75e9b3a6a..11a5460d0 100644
--- a/src/render/geometry/qgeometryrenderer.cpp
+++ b/src/render/geometry/qgeometryrenderer.cpp
@@ -88,7 +88,7 @@ QGeometryRendererPrivate::~QGeometryRendererPrivate()
\brief Encapsulates geometry rendering.
A Qt3DRender::QGeometryRenderer holds all the information necessary to draw
- a Qt3DRender::QGeometry. A QGeometry holds the coordinates of the geometry data -
+ a Qt3DCore::QGeometry. A QGeometry holds the coordinates of the geometry data -
QGeometryRenderer specifies how to interpret that data.
*/
diff --git a/src/render/geometry/qgeometryrenderer.h b/src/render/geometry/qgeometryrenderer.h
index 5a98329f6..435a315ad 100644
--- a/src/render/geometry/qgeometryrenderer.h
+++ b/src/render/geometry/qgeometryrenderer.h
@@ -41,11 +41,17 @@
#define QT3DRENDER_QGEOMETRYRENDERER_H
#include <Qt3DCore/qcomponent.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/qt3drender_global.h>
QT_BEGIN_NAMESPACE
+namespace Qt3DCore {
+class QGeometryFactory;
+
+typedef QSharedPointer<QGeometryFactory> QGeometryFactoryPtr;
+}
+
namespace Qt3DRender {
class QGeometryRendererPrivate;
@@ -62,7 +68,7 @@ class Q_3DRENDERSHARED_EXPORT QGeometryRenderer : public Qt3DCore::QComponent
Q_PROPERTY(int restartIndexValue READ restartIndexValue WRITE setRestartIndexValue NOTIFY restartIndexValueChanged)
Q_PROPERTY(int verticesPerPatch READ verticesPerPatch WRITE setVerticesPerPatch NOTIFY verticesPerPatchChanged)
Q_PROPERTY(bool primitiveRestartEnabled READ primitiveRestartEnabled WRITE setPrimitiveRestartEnabled NOTIFY primitiveRestartEnabledChanged)
- Q_PROPERTY(Qt3DRender::QGeometry* geometry READ geometry WRITE setGeometry NOTIFY geometryChanged)
+ Q_PROPERTY(Qt3DCore::QGeometry* geometry READ geometry WRITE setGeometry NOTIFY geometryChanged)
Q_PROPERTY(PrimitiveType primitiveType READ primitiveType WRITE setPrimitiveType NOTIFY primitiveTypeChanged)
public:
@@ -97,7 +103,7 @@ public:
int restartIndexValue() const;
int verticesPerPatch() const;
bool primitiveRestartEnabled() const;
- QGeometry *geometry() const;
+ Qt3DCore::QGeometry *geometry() const;
PrimitiveType primitiveType() const;
public Q_SLOTS:
@@ -110,7 +116,7 @@ public Q_SLOTS:
void setRestartIndexValue(int index);
void setVerticesPerPatch(int verticesPerPatch);
void setPrimitiveRestartEnabled(bool enabled);
- void setGeometry(QGeometry *geometry);
+ void setGeometry(Qt3DCore::QGeometry *geometry);
void setPrimitiveType(PrimitiveType primitiveType);
Q_SIGNALS:
@@ -123,7 +129,7 @@ Q_SIGNALS:
void restartIndexValueChanged(int restartIndexValue);
void verticesPerPatchChanged(int verticesPerPatch);
void primitiveRestartEnabledChanged(bool primitiveRestartEnabled);
- void geometryChanged(QGeometry *geometry);
+ void geometryChanged(Qt3DCore::QGeometry *geometry);
void primitiveTypeChanged(PrimitiveType primitiveType);
protected:
diff --git a/src/render/geometry/qgeometryrenderer_p.h b/src/render/geometry/qgeometryrenderer_p.h
index 926eb24f7..ab2a3f0f8 100644
--- a/src/render/geometry/qgeometryrenderer_p.h
+++ b/src/render/geometry/qgeometryrenderer_p.h
@@ -51,9 +51,9 @@
// We mean it.
//
+#include <Qt3DCore/private/qgeometryfactory_p.h>
#include <Qt3DCore/private/qcomponent_p.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/private/qgeometryfactory_p.h>
#include <Qt3DRender/private/qt3drender_global_p.h>
#include <memory>
@@ -78,9 +78,9 @@ public:
int m_restartIndexValue;
int m_verticesPerPatch;
bool m_primitiveRestart;
- QGeometry *m_geometry;
+ Qt3DCore::QGeometry *m_geometry;
QGeometryRenderer::PrimitiveType m_primitiveType;
- QGeometryFactoryPtr m_geometryFactory;
+ Qt3DCore::QGeometryFactoryPtr m_geometryFactory;
};
} // namespace Qt3DRender
diff --git a/src/render/geometry/qmesh.cpp b/src/render/geometry/qmesh.cpp
index 531312fb1..1180380b0 100644
--- a/src/render/geometry/qmesh.cpp
+++ b/src/render/geometry/qmesh.cpp
@@ -52,11 +52,11 @@
#include <Qt3DCore/QAspectEngine>
#include <Qt3DCore/private/qscene_p.h>
#include <Qt3DCore/private/qdownloadhelperservice_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <Qt3DRender/private/qrenderaspect_p.h>
#include <Qt3DRender/private/nodemanagers_p.h>
#include <Qt3DRender/private/qgeometryloaderinterface_p.h>
#include <Qt3DRender/private/renderlogging_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
#include <Qt3DRender/private/qgeometryloaderfactory_p.h>
#include <Qt3DRender/private/geometryrenderermanager_p.h>
@@ -64,6 +64,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt3DCore;
+
namespace Qt3DRender {
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, geometryLoader, (QGeometryLoaderFactory_iid, QLatin1String("/geometryloaders"), Qt::CaseInsensitive))
@@ -291,7 +293,7 @@ MeshLoaderFunctor::MeshLoaderFunctor(QMesh *mesh, const QByteArray &sourceData)
/*!
* \internal
*/
-QGeometry *MeshLoaderFunctor::operator()()
+Qt3DCore::QGeometry *MeshLoaderFunctor::operator()()
{
m_status = QMesh::Loading;
@@ -329,7 +331,7 @@ QGeometry *MeshLoaderFunctor::operator()()
if (!ext.contains(QLatin1String("obj")))
ext << QLatin1String("obj");
} else {
- QString filePath = Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(m_sourcePath);
+ QString filePath = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(m_sourcePath);
QFileInfo finfo(filePath);
if (finfo.suffix().isEmpty())
ext << QLatin1String("obj");
@@ -350,7 +352,7 @@ QGeometry *MeshLoaderFunctor::operator()()
}
if (m_sourceData.isEmpty()) {
- QString filePath = Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(m_sourcePath);
+ QString filePath = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(m_sourcePath);
QFile file(filePath);
if (!file.open(QIODevice::ReadOnly)) {
qCDebug(Render::Jobs) << "Could not open file" << filePath << "for reading";
@@ -359,7 +361,7 @@ QGeometry *MeshLoaderFunctor::operator()()
}
if (loader->load(&file, m_meshName)) {
- Qt3DRender::QGeometry *geometry = loader->geometry();
+ Qt3DCore::QGeometry *geometry = loader->geometry();
m_status = geometry != nullptr ? QMesh::Ready : QMesh::Error;
return geometry;
}
@@ -372,7 +374,7 @@ QGeometry *MeshLoaderFunctor::operator()()
}
if (loader->load(&buffer, m_meshName)) {
- Qt3DRender::QGeometry *geometry = loader->geometry();
+ Qt3DCore::QGeometry *geometry = loader->geometry();
m_status = geometry != nullptr ? QMesh::Ready : QMesh::Error;
return geometry;
}
@@ -423,7 +425,7 @@ void MeshDownloadRequest::onCompleted()
return;
QGeometryFactoryPtr geometryFactory = renderer->geometryFactory();
- if (!geometryFactory.isNull() && geometryFactory->id() == Qt3DRender::functorTypeId<MeshLoaderFunctor>()) {
+ if (!geometryFactory.isNull() && geometryFactory->id() == Qt3DCore::functorTypeId<MeshLoaderFunctor>()) {
QSharedPointer<MeshLoaderFunctor> functor = qSharedPointerCast<MeshLoaderFunctor>(geometryFactory);
// We make sure we are setting the result for the right request
diff --git a/src/render/geometry/qmesh_p.h b/src/render/geometry/qmesh_p.h
index c80c930c5..9d34a6ae6 100644
--- a/src/render/geometry/qmesh_p.h
+++ b/src/render/geometry/qmesh_p.h
@@ -98,7 +98,7 @@ private:
Render::NodeManagers *m_nodeManagers;
};
-class Q_AUTOTEST_EXPORT MeshLoaderFunctor : public QGeometryFactory
+class Q_AUTOTEST_EXPORT MeshLoaderFunctor : public Qt3DCore::QGeometryFactory
{
public :
MeshLoaderFunctor(QMesh *mesh, const QByteArray &sourceData = QByteArray());
@@ -118,12 +118,9 @@ public :
QMesh::Status status() const { return m_status; }
- QGeometry *operator()() override;
- bool operator ==(const QGeometryFactory &other) const override;
- QT_WARNING_PUSH
- QT_WARNING_DISABLE_DEPRECATED
+ Qt3DCore::QGeometry *operator()() override;
+ bool operator ==(const Qt3DCore::QGeometryFactory &other) const override;
QT3D_FUNCTOR(MeshLoaderFunctor)
- QT_WARNING_POP
private:
Qt3DCore::QNodeId m_mesh;
diff --git a/src/render/io/io.pri b/src/render/io/io.pri
index 6a48ebbc4..f01b11ce5 100644
--- a/src/render/io/io.pri
+++ b/src/render/io/io.pri
@@ -4,7 +4,6 @@ HEADERS += \
$$PWD/qaxisalignedboundingbox_p.h \
$$PWD/qsceneloader.h \
$$PWD/qsceneloader_p.h \
- $$PWD/qurlhelper_p.h \
$$PWD/scene_p.h \
$$PWD/scenemanager_p.h \
$$PWD/qsceneimporter_p.h \
@@ -19,7 +18,6 @@ HEADERS += \
SOURCES += \
$$PWD/qaxisalignedboundingbox.cpp \
$$PWD/qsceneloader.cpp \
- $$PWD/qurlhelper.cpp \
$$PWD/scene.cpp \
$$PWD/scenemanager.cpp \
$$PWD/qsceneimporter.cpp \
diff --git a/src/render/io/qgeometryloaderinterface_p.h b/src/render/io/qgeometryloaderinterface_p.h
index 36928445f..f264cc6b2 100644
--- a/src/render/io/qgeometryloaderinterface_p.h
+++ b/src/render/io/qgeometryloaderinterface_p.h
@@ -59,14 +59,16 @@ QT_BEGIN_NAMESPACE
class QIODevice;
-namespace Qt3DRender {
-
+namespace Qt3DCore {
class QGeometry;
+}
+
+namespace Qt3DRender {
class Q_3DRENDERSHARED_PRIVATE_EXPORT QGeometryLoaderInterface : public QObject
{
public:
- virtual QGeometry *geometry() const = 0;
+ virtual Qt3DCore::QGeometry *geometry() const = 0;
virtual bool load(QIODevice *ioDev, const QString &subMesh = QString()) = 0;
};
diff --git a/src/render/jobs/calcboundingvolumejob.cpp b/src/render/jobs/calcboundingvolumejob.cpp
index 1e4656247..1f0d9ccce 100644
--- a/src/render/jobs/calcboundingvolumejob.cpp
+++ b/src/render/jobs/calcboundingvolumejob.cpp
@@ -52,7 +52,7 @@
#include <Qt3DRender/private/sphere_p.h>
#include <Qt3DRender/private/buffervisitor_p.h>
#include <Qt3DRender/private/entityaccumulator_p.h>
-#include <Qt3DRender/private/qgeometry_p.h>
+#include <Qt3DCore/private/qgeometry_p.h>
#include <Qt3DCore/private/qaspectmanager_p.h>
#include <QtCore/qmath.h>
@@ -63,6 +63,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt3DCore;
+
namespace Qt3DRender {
namespace Render {
@@ -271,7 +273,7 @@ QVector<Geometry *> calculateLocalBoundingVolume(NodeManagers *manager, Entity *
for (Qt3DCore::QNodeId attrNodeId : attributes) {
Qt3DRender::Render::Attribute *attr = manager->lookupResource<Attribute, AttributeManager>(attrNodeId);
- if (attr && attr->attributeType() == Qt3DRender::QAttribute::IndexAttribute) {
+ if (attr && attr->attributeType() == QAttribute::IndexAttribute) {
indexBuf = manager->lookupResource<Buffer, BufferManager>(attr->bufferId());
if (indexBuf) {
indexAttribute = attr;
@@ -361,10 +363,10 @@ public:
void postFrame(Qt3DCore::QAspectManager *manager) override
{
for (Geometry *backend : qAsConst(m_updatedGeometries)) {
- QGeometry *node = qobject_cast<QGeometry *>(manager->lookupNode(backend->peerId()));
+ Qt3DCore::QGeometry *node = qobject_cast<Qt3DCore::QGeometry *>(manager->lookupNode(backend->peerId()));
if (!node)
continue;
- QGeometryPrivate *dNode = static_cast<QGeometryPrivate *>(Qt3DCore::QNodePrivate::get(node));
+ Qt3DCore::QGeometryPrivate *dNode = static_cast<Qt3DCore::QGeometryPrivate *>(Qt3DCore::QNodePrivate::get(node));
dNode->setExtent(backend->min(), backend->max());
}
}
diff --git a/src/render/jobs/loadbufferjob.cpp b/src/render/jobs/loadbufferjob.cpp
index fd57248e1..f70426ac6 100644
--- a/src/render/jobs/loadbufferjob.cpp
+++ b/src/render/jobs/loadbufferjob.cpp
@@ -39,9 +39,9 @@
#include "loadbufferjob_p.h"
#include <Qt3DRender/private/buffer_p.h>
-#include <Qt3DRender/private/qbuffer_p.h>
#include <Qt3DRender/private/buffermanager_p.h>
#include <Qt3DRender/private/job_common_p.h>
+#include <Qt3DCore/private/qbuffer_p.h>
#include <Qt3DCore/private/qaspectmanager_p.h>
#include <Qt3DRender/private/renderlogging_p.h>
@@ -90,8 +90,8 @@ void LoadBufferJobPrivate::postFrame(Qt3DCore::QAspectManager *aspectManager)
{
if (m_bufferToUpdate == nullptr)
return;
- QBuffer *frontendBuffer = static_cast<decltype(frontendBuffer)>(aspectManager->lookupNode(m_bufferToUpdate->peerId()));
- QBufferPrivate *dFrontend = static_cast<decltype(dFrontend)>(Qt3DCore::QNodePrivate::get(frontendBuffer));
+ Qt3DCore::QBuffer *frontendBuffer = static_cast<decltype(frontendBuffer)>(aspectManager->lookupNode(m_bufferToUpdate->peerId()));
+ Qt3DCore::QBufferPrivate *dFrontend = static_cast<decltype(dFrontend)>(Qt3DCore::QNodePrivate::get(frontendBuffer));
// Calling frontendBuffer->setData would result in forcing a sync against the backend
// which isn't necessary
dFrontend->setData(m_bufferToUpdate->data());
diff --git a/src/render/jobs/loadscenejob.cpp b/src/render/jobs/loadscenejob.cpp
index 959cbe3eb..f22f4a84c 100644
--- a/src/render/jobs/loadscenejob.cpp
+++ b/src/render/jobs/loadscenejob.cpp
@@ -43,9 +43,9 @@
#include <QCoreApplication>
#include <Qt3DCore/qentity.h>
#include <Qt3DCore/private/qaspectmanager_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <Qt3DRender/private/job_common_p.h>
#include <Qt3DRender/private/qsceneimporter_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
#include <Qt3DRender/qsceneloader.h>
#include <Qt3DRender/private/qsceneloader_p.h>
#include <Qt3DRender/private/renderlogging_p.h>
@@ -106,7 +106,7 @@ void LoadSceneJob::run()
finalStatus = QSceneLoader::Error;
if (m_data.isEmpty()) {
- const QString path = QUrlHelper::urlToLocalFileOrQrc(m_source);
+ const QString path = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(m_source);
const QFileInfo finfo(path);
qCDebug(SceneLoaders) << Q_FUNC_INFO << "Attempting to load" << finfo.filePath();
if (finfo.exists()) {
diff --git a/src/render/jobs/loadskeletonjob.cpp b/src/render/jobs/loadskeletonjob.cpp
index de12b7e39..763c06530 100644
--- a/src/render/jobs/loadskeletonjob.cpp
+++ b/src/render/jobs/loadskeletonjob.cpp
@@ -42,10 +42,10 @@
#include <Qt3DCore/private/qabstractnodefactory_p.h>
#include <Qt3DCore/private/qaspectmanager_p.h>
#include <Qt3DCore/private/qskeletonloader_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <Qt3DRender/private/managers_p.h>
#include <Qt3DRender/private/nodemanagers_p.h>
#include <Qt3DRender/private/job_common_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
#include <Qt3DRender/private/gltfskeletonloader_p.h>
#include <Qt3DRender/private/renderlogging_p.h>
#include <QtCore/QCoreApplication>
@@ -128,7 +128,7 @@ void LoadSkeletonJob::loadSkeletonFromUrl(Skeleton *skeleton)
using namespace Qt3DCore;
// TODO: Handle remote files
- QString filePath = Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(skeleton->source());
+ QString filePath = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(skeleton->source());
QFileInfo info(filePath);
if (!info.exists()) {
qWarning() << "Could not open skeleton file:" << filePath;
diff --git a/src/render/jobs/sendbuffercapturejob.cpp b/src/render/jobs/sendbuffercapturejob.cpp
index 2ccb72337..b6a3cabcf 100644
--- a/src/render/jobs/sendbuffercapturejob.cpp
+++ b/src/render/jobs/sendbuffercapturejob.cpp
@@ -44,7 +44,7 @@
#include <Qt3DRender/private/buffer_p.h>
#include <Qt3DRender/private/buffermanager_p.h>
#include <Qt3DCore/private/qaspectmanager_p.h>
-#include <Qt3DRender/private/qbuffer_p.h>
+#include <Qt3DCore/private/qbuffer_p.h>
QT_BEGIN_NAMESPACE
@@ -112,10 +112,10 @@ void SendBufferCaptureJobPrivate::postFrame(Qt3DCore::QAspectManager *aspectMana
QMutexLocker locker(&m_mutex);
const QVector<QPair<Qt3DCore::QNodeId, QByteArray>> pendingSendBufferCaptures = std::move(m_buffersToNotify);
for (const auto &bufferDataPair : pendingSendBufferCaptures) {
- QBuffer *frontendBuffer = static_cast<decltype(frontendBuffer)>(aspectManager->lookupNode(bufferDataPair.first));
+ Qt3DCore::QBuffer *frontendBuffer = static_cast<decltype(frontendBuffer)>(aspectManager->lookupNode(bufferDataPair.first));
if (!frontendBuffer)
continue;
- QBufferPrivate *dFrontend = static_cast<decltype(dFrontend)>(Qt3DCore::QNodePrivate::get(frontendBuffer));
+ Qt3DCore::QBufferPrivate *dFrontend = static_cast<decltype(dFrontend)>(Qt3DCore::QNodePrivate::get(frontendBuffer));
// Calling frontendBuffer->setData would result in forcing a sync against the backend
// which isn't necessary
dFrontend->setData(bufferDataPair.second);
diff --git a/src/render/materialsystem/parameter.cpp b/src/render/materialsystem/parameter.cpp
index 3360aebef..d515361ab 100644
--- a/src/render/materialsystem/parameter.cpp
+++ b/src/render/materialsystem/parameter.cpp
@@ -42,7 +42,6 @@
#include <Qt3DRender/private/qparameter_p.h>
#include <Qt3DRender/qtexture.h>
#include <Qt3DRender/qshaderdata.h>
-#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/private/buffer_p.h>
#include <Qt3DRender/private/managers_p.h>
diff --git a/src/render/materialsystem/qshaderprogram.cpp b/src/render/materialsystem/qshaderprogram.cpp
index 8281d2707..50eb26a30 100644
--- a/src/render/materialsystem/qshaderprogram.cpp
+++ b/src/render/materialsystem/qshaderprogram.cpp
@@ -39,7 +39,7 @@
#include "qshaderprogram.h"
#include "qshaderprogram_p.h"
-#include <Qt3DRender/private/qurlhelper_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <QDebug>
#include <QFile>
#include <QFileInfo>
@@ -710,7 +710,7 @@ QByteArray QShaderProgramPrivate::deincludify(const QByteArray &contents, const
QByteArray QShaderProgram::loadSource(const QUrl &sourceUrl)
{
// TO DO: Handle remote path
- return QShaderProgramPrivate::deincludify(Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(sourceUrl));
+ return QShaderProgramPrivate::deincludify(Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(sourceUrl));
}
} // of namespace Qt3DRender
diff --git a/src/render/materialsystem/qshaderprogrambuilder.cpp b/src/render/materialsystem/qshaderprogrambuilder.cpp
index 60685d73c..a52e3ddaa 100644
--- a/src/render/materialsystem/qshaderprogrambuilder.cpp
+++ b/src/render/materialsystem/qshaderprogrambuilder.cpp
@@ -40,7 +40,6 @@
#include "qshaderprogrambuilder.h"
#include "qshaderprogrambuilder_p.h"
#include "qshaderprogram.h"
-#include <Qt3DRender/private/qurlhelper_p.h>
#include <QDebug>
#include <QFile>
#include <QFileInfo>
diff --git a/src/render/materialsystem/shaderbuilder.cpp b/src/render/materialsystem/shaderbuilder.cpp
index 5c933759f..871b4cb4c 100644
--- a/src/render/materialsystem/shaderbuilder.cpp
+++ b/src/render/materialsystem/shaderbuilder.cpp
@@ -42,7 +42,7 @@
#include <Qt3DRender/private/qshaderprogrambuilder_p.h>
#include <Qt3DRender/qshaderprogram.h>
#include <Qt3DRender/private/qshaderprogram_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <QtGui/private/qshaderformat_p.h>
#include <QtGui/private/qshadergraphloader_p.h>
@@ -213,7 +213,7 @@ bool ShaderBuilder::isShaderCodeDirty(QShaderProgram::ShaderType type) const
void ShaderBuilder::generateCode(QShaderProgram::ShaderType type)
{
- const auto graphPath = QUrlHelper::urlToLocalFileOrQrc(shaderGraph(type));
+ const auto graphPath = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(shaderGraph(type));
QFile file(graphPath);
if (!file.open(QFile::ReadOnly)) {
qWarning() << "Couldn't open file:" << graphPath;
diff --git a/src/render/picking/objectpicker.cpp b/src/render/picking/objectpicker.cpp
index 84169586e..7d6fcede8 100644
--- a/src/render/picking/objectpicker.cpp
+++ b/src/render/picking/objectpicker.cpp
@@ -41,7 +41,6 @@
#include "qpickevent.h"
#include <Qt3DRender/qobjectpicker.h>
#include <Qt3DRender/private/qobjectpicker_p.h>
-#include <Qt3DRender/qattribute.h>
#include <Qt3DRender/private/pickboundingvolumejob_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/render/picking/qobjectpicker.cpp b/src/render/picking/qobjectpicker.cpp
index 15dc70536..498b0d97a 100644
--- a/src/render/picking/qobjectpicker.cpp
+++ b/src/render/picking/qobjectpicker.cpp
@@ -76,7 +76,7 @@ namespace Qt3DRender {
For generalised ray casting queries, see Qt3DRender::QRayCaster and Qt3DRender::QScreenRayCaster.
- \sa Qt3DRender::QPickingSettings, Qt3DRender::QGeometry, Qt3DRender::QAttribute,
+ \sa Qt3DRender::QPickingSettings, Qt3DCore::QGeometry, Qt3DCore::QAttribute,
Qt3DRender::QPickEvent, Qt3DRender::QPickTriangleEvent, Qt3DRender::QNoPicking
\note Instances of this component shouldn't be shared, not respecting that
diff --git a/src/render/picking/qobjectpicker.h b/src/render/picking/qobjectpicker.h
index 98516db76..c2c93272c 100644
--- a/src/render/picking/qobjectpicker.h
+++ b/src/render/picking/qobjectpicker.h
@@ -47,7 +47,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
-class QAttribute;
class QObjectPickerPrivate;
class QPickEvent;
diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp
index 6b7b92166..f30e23d41 100644
--- a/src/render/texture/qtexture.cpp
+++ b/src/render/texture/qtexture.cpp
@@ -52,11 +52,11 @@
#include <Qt3DCore/private/qscene_p.h>
#include <Qt3DCore/qaspectengine.h>
#include <Qt3DCore/private/qdownloadhelperservice_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <Qt3DRender/private/qrenderaspect_p.h>
#include <Qt3DRender/private/nodemanagers_p.h>
#include <Qt3DRender/private/managers_p.h>
#include <Qt3DRender/private/texture_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
#include <qmath.h>
QT_BEGIN_NAMESPACE
@@ -1001,7 +1001,7 @@ QTextureImageDataPtr TextureLoadingHelper::loadTextureData(const QUrl &url, bool
|| url.scheme() == QLatin1String("assets")
#endif
) {
- const QString source = Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(url);
+ const QString source = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(url);
QFile f(source);
if (!f.open(QIODevice::ReadOnly))
qWarning() << "Failed to open" << source;
diff --git a/src/render/texture/qtexturegenerator_p.h b/src/render/texture/qtexturegenerator_p.h
index a3b12273b..933346f2e 100644
--- a/src/render/texture/qtexturegenerator_p.h
+++ b/src/render/texture/qtexturegenerator_p.h
@@ -51,7 +51,7 @@
#ifndef QT3DRENDER_QTEXTUREGENERATOR_P_H
#define QT3DRENDER_QTEXTUREGENERATOR_P_H
-#include <Qt3DRender/qabstractfunctor.h>
+#include <Qt3DCore/qabstractfunctor.h>
#include <Qt3DRender/qabstracttexture.h>
#include <Qt3DRender/qtexturewrapmode.h>
#include <QtCore/QSharedPointer>
@@ -63,7 +63,7 @@ namespace Qt3DRender {
class QTextureData;
typedef QSharedPointer<QTextureData> QTextureDataPtr;
-class Q_3DRENDERSHARED_EXPORT QTextureGenerator : public QAbstractFunctor
+class Q_3DRENDERSHARED_EXPORT QTextureGenerator : public Qt3DCore::QAbstractFunctor
{
public:
virtual ~QTextureGenerator();
diff --git a/src/render/texture/qtextureimage_p.h b/src/render/texture/qtextureimage_p.h
index 3cb704cf8..09f0fe865 100644
--- a/src/render/texture/qtextureimage_p.h
+++ b/src/render/texture/qtextureimage_p.h
@@ -55,7 +55,6 @@
#include <Qt3DRender/private/qabstracttextureimage_p.h>
#include <Qt3DRender/qtextureimage.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
#include <Qt3DRender/qtextureimagedatagenerator.h>
#include <Qt3DRender/private/qt3drender_global_p.h>
diff --git a/src/render/texture/qtextureimagedata.cpp b/src/render/texture/qtextureimagedata.cpp
index 28d296feb..1750fcb13 100644
--- a/src/render/texture/qtextureimagedata.cpp
+++ b/src/render/texture/qtextureimagedata.cpp
@@ -38,9 +38,9 @@
****************************************************************************/
#include "qtextureimagedata_p.h"
-#include <QDebug>
#include <QFileInfo>
#include <QFile>
+#include <QDebug>
QT_BEGIN_NAMESPACE
diff --git a/src/render/texture/qtextureimagedatagenerator.h b/src/render/texture/qtextureimagedatagenerator.h
index 9dc636ea1..7eaba598d 100644
--- a/src/render/texture/qtextureimagedatagenerator.h
+++ b/src/render/texture/qtextureimagedatagenerator.h
@@ -40,7 +40,8 @@
#ifndef QT3DRENDER_QTEXTUREIMAGEDATAGENERATOR_H
#define QT3DRENDER_QTEXTUREIMAGEDATAGENERATOR_H
-#include <Qt3DRender/qabstractfunctor.h>
+#include <Qt3DCore/qabstractfunctor.h>
+#include <Qt3DRender/qt3drender_global.h>
#include <QtCore/QSharedPointer>
// TO DO TexImageDataPtr -> QImageDataPtr + d_ptr
@@ -55,7 +56,7 @@ namespace Qt3DRender {
class QTextureImageData;
typedef QSharedPointer<QTextureImageData> QTextureImageDataPtr;
-class Q_3DRENDERSHARED_EXPORT QTextureImageDataGenerator : public QAbstractFunctor
+class Q_3DRENDERSHARED_EXPORT QTextureImageDataGenerator : public Qt3DCore::QAbstractFunctor
{
public:
virtual ~QTextureImageDataGenerator();
diff --git a/tests/auto/animation/qmorphinganimation/tst_qmorphinganimation.cpp b/tests/auto/animation/qmorphinganimation/tst_qmorphinganimation.cpp
index 77ff01851..f41c8871b 100644
--- a/tests/auto/animation/qmorphinganimation/tst_qmorphinganimation.cpp
+++ b/tests/auto/animation/qmorphinganimation/tst_qmorphinganimation.cpp
@@ -35,11 +35,11 @@ class tst_QMorphingAnimation : public QObject
{
Q_OBJECT
- bool verifyAttribute(Qt3DRender::QGeometry *geometry, QString name,
- Qt3DRender::QAttribute *attribute)
+ bool verifyAttribute(Qt3DCore::QGeometry *geometry, QString name,
+ Qt3DCore::QAttribute *attribute)
{
- const QVector<Qt3DRender::QAttribute *> attributes = geometry->attributes();
- for (const Qt3DRender::QAttribute *attr : attributes) {
+ const QVector<Qt3DCore::QAttribute *> attributes = geometry->attributes();
+ for (const Qt3DCore::QAttribute *attr : attributes) {
if (attr->name() == name) {
if (attr == attribute)
return true;
@@ -161,15 +161,15 @@ private Q_SLOTS:
const QString baseName("position");
const QString targetName("positionTarget");
Qt3DAnimation::QMorphingAnimation morphingAnimation;
- Qt3DRender::QAttribute *base = new Qt3DRender::QAttribute;
+ Qt3DCore::QAttribute *base = new Qt3DCore::QAttribute;
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry;
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry;
Qt3DAnimation::QMorphTarget *mt1 = new Qt3DAnimation::QMorphTarget(&morphingAnimation);
Qt3DAnimation::QMorphTarget *mt2 = new Qt3DAnimation::QMorphTarget(&morphingAnimation);
Qt3DAnimation::QMorphTarget *mt3 = new Qt3DAnimation::QMorphTarget(&morphingAnimation);
- Qt3DRender::QAttribute *a1 = new Qt3DRender::QAttribute(geometry);
- Qt3DRender::QAttribute *a2 = new Qt3DRender::QAttribute(geometry);
- Qt3DRender::QAttribute *a3 = new Qt3DRender::QAttribute(geometry);
+ Qt3DCore::QAttribute *a1 = new Qt3DCore::QAttribute(geometry);
+ Qt3DCore::QAttribute *a2 = new Qt3DCore::QAttribute(geometry);
+ Qt3DCore::QAttribute *a3 = new Qt3DCore::QAttribute(geometry);
Qt3DRender::QGeometryRenderer gr;
base->setName(baseName);
diff --git a/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp b/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp
index 2cba9ba2a..1511ea167 100644
--- a/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp
+++ b/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp
@@ -50,11 +50,11 @@ private Q_SLOTS:
{
// GIVEN
Qt3DAnimation::QMorphTarget morphTarget;
- Qt3DRender::QAttribute attribute1;
- Qt3DRender::QAttribute attribute2;
+ Qt3DCore::QAttribute attribute1;
+ Qt3DCore::QAttribute attribute2;
- attribute1.setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- attribute2.setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
+ attribute1.setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ attribute2.setName(Qt3DCore::QAttribute::defaultNormalAttributeName());
{
// WHEN
@@ -63,7 +63,7 @@ private Q_SLOTS:
// THEN
QStringList names = morphTarget.attributeNames();
QCOMPARE(names.size(), 1);
- QCOMPARE(names.at(0), Qt3DRender::QAttribute::defaultPositionAttributeName());
+ QCOMPARE(names.at(0), Qt3DCore::QAttribute::defaultPositionAttributeName());
}
{
@@ -73,23 +73,23 @@ private Q_SLOTS:
// THEN
QStringList names = morphTarget.attributeNames();
QCOMPARE(names.size(), 2);
- QCOMPARE(names.at(1), Qt3DRender::QAttribute::defaultNormalAttributeName());
+ QCOMPARE(names.at(1), Qt3DCore::QAttribute::defaultNormalAttributeName());
}
}
void testFromGeometry()
{
// GIVEN
- Qt3DRender::QGeometry geometry;
- Qt3DRender::QAttribute *attribute1 = new Qt3DRender::QAttribute;
- Qt3DRender::QAttribute *attribute2 = new Qt3DRender::QAttribute;
- attribute1->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- attribute2->setName(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
+ Qt3DCore::QGeometry geometry;
+ Qt3DCore::QAttribute *attribute1 = new Qt3DCore::QAttribute;
+ Qt3DCore::QAttribute *attribute2 = new Qt3DCore::QAttribute;
+ attribute1->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ attribute2->setName(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
geometry.addAttribute(attribute1);
geometry.addAttribute(attribute2);
QStringList attributes;
- attributes.push_back(Qt3DRender::QAttribute::defaultPositionAttributeName());
+ attributes.push_back(Qt3DCore::QAttribute::defaultPositionAttributeName());
{
// WHEN
@@ -99,20 +99,20 @@ private Q_SLOTS:
// THEN
QStringList names = morphTarget->attributeNames();
QCOMPARE(names.size(), 1);
- QCOMPARE(names.at(0), Qt3DRender::QAttribute::defaultPositionAttributeName());
+ QCOMPARE(names.at(0), Qt3DCore::QAttribute::defaultPositionAttributeName());
}
{
// WHEN
- attributes.push_back(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
+ attributes.push_back(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
QScopedPointer<Qt3DAnimation::QMorphTarget> morphTarget(
Qt3DAnimation::QMorphTarget::fromGeometry(&geometry, attributes));
// THEN
QStringList names = morphTarget->attributeNames();
QCOMPARE(names.size(), 2);
- QCOMPARE(names.at(0), Qt3DRender::QAttribute::defaultPositionAttributeName());
- QCOMPARE(names.at(1), Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
+ QCOMPARE(names.at(0), Qt3DCore::QAttribute::defaultPositionAttributeName());
+ QCOMPARE(names.at(1), Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
}
}
diff --git a/tests/auto/extras/common/geometrytesthelper.h b/tests/auto/extras/common/geometrytesthelper.h
index b825fa407..a80d652a8 100644
--- a/tests/auto/extras/common/geometrytesthelper.h
+++ b/tests/auto/extras/common/geometrytesthelper.h
@@ -29,12 +29,12 @@
#ifndef GEOMETRYTESTHELPER_H
#define GEOMETRYTESTHELPER_H
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
template<typename IndexType>
-IndexType extractIndexData(Qt3DRender::QAttribute *attribute, int index)
+IndexType extractIndexData(Qt3DCore::QAttribute *attribute, int index)
{
// Get the raw data
const IndexType *typedData = reinterpret_cast<const IndexType *>(attribute->buffer()->data().constData());
@@ -45,7 +45,7 @@ IndexType extractIndexData(Qt3DRender::QAttribute *attribute, int index)
}
template<typename VertexType, typename IndexType>
-VertexType extractVertexData(Qt3DRender::QAttribute *attribute, IndexType index)
+VertexType extractVertexData(Qt3DCore::QAttribute *attribute, IndexType index)
{
// Get the raw data
const char *rawData = attribute->buffer()->data().constData();
@@ -55,10 +55,10 @@ VertexType extractVertexData(Qt3DRender::QAttribute *attribute, IndexType index)
// Construct vertex from the typed data
VertexType vertex;
- const Qt3DRender::QAttribute::VertexBaseType type = attribute->vertexBaseType();
+ const Qt3DCore::QAttribute::VertexBaseType type = attribute->vertexBaseType();
switch (type)
{
- case Qt3DRender::QAttribute::Float: {
+ case Qt3DCore::QAttribute::Float: {
const float *typedVertexData = reinterpret_cast<const float *>(vertexData);
const int components = attribute->vertexSize();
for (int i = 0; i < components; ++i)
diff --git a/tests/auto/extras/qcuboidgeometry/tst_qcuboidgeometry.cpp b/tests/auto/extras/qcuboidgeometry/tst_qcuboidgeometry.cpp
index f20b1e870..2bfa89601 100644
--- a/tests/auto/extras/qcuboidgeometry/tst_qcuboidgeometry.cpp
+++ b/tests/auto/extras/qcuboidgeometry/tst_qcuboidgeometry.cpp
@@ -29,9 +29,9 @@
#include <QtTest/QTest>
#include <QObject>
#include <Qt3DExtras/qcuboidgeometry.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <qopenglcontext.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <QtGui/qopenglcontext.h>
#include <QtGui/qvector2d.h>
#include <QtGui/qvector3d.h>
#include <QtGui/qvector4d.h>
@@ -58,13 +58,13 @@ private Q_SLOTS:
QCOMPARE(geometry.yzMeshResolution(), QSize(2, 2));
QCOMPARE(geometry.xzMeshResolution(), QSize(2, 2));
QVERIFY(geometry.positionAttribute() != nullptr);
- QCOMPARE(geometry.positionAttribute()->name(), Qt3DRender::QAttribute::defaultPositionAttributeName());
+ QCOMPARE(geometry.positionAttribute()->name(), Qt3DCore::QAttribute::defaultPositionAttributeName());
QVERIFY(geometry.normalAttribute() != nullptr);
- QCOMPARE(geometry.normalAttribute()->name(), Qt3DRender::QAttribute::defaultNormalAttributeName());
+ QCOMPARE(geometry.normalAttribute()->name(), Qt3DCore::QAttribute::defaultNormalAttributeName());
QVERIFY(geometry.texCoordAttribute() != nullptr);
- QCOMPARE(geometry.texCoordAttribute()->name(), Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
+ QCOMPARE(geometry.texCoordAttribute()->name(), Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
QVERIFY(geometry.tangentAttribute() != nullptr);
- QCOMPARE(geometry.tangentAttribute()->name(), Qt3DRender::QAttribute::defaultTangentAttributeName());
+ QCOMPARE(geometry.tangentAttribute()->name(), Qt3DCore::QAttribute::defaultTangentAttributeName());
QVERIFY(geometry.indexAttribute() != nullptr);
}
@@ -520,12 +520,12 @@ private Q_SLOTS:
{
// GIVEN
Qt3DExtras::QCuboidGeometry geometry;
- const QVector<Qt3DRender::QAttribute *> attributes = geometry.attributes();
- Qt3DRender::QAttribute *positionAttribute = geometry.positionAttribute();
- Qt3DRender::QAttribute *normalAttribute = geometry.normalAttribute();
- Qt3DRender::QAttribute *texCoordAttribute = geometry.texCoordAttribute();
- Qt3DRender::QAttribute *tangentAttribute = geometry.tangentAttribute();
- Qt3DRender::QAttribute *indexAttribute = geometry.indexAttribute();
+ const QVector<Qt3DCore::QAttribute *> attributes = geometry.attributes();
+ Qt3DCore::QAttribute *positionAttribute = geometry.positionAttribute();
+ Qt3DCore::QAttribute *normalAttribute = geometry.normalAttribute();
+ Qt3DCore::QAttribute *texCoordAttribute = geometry.texCoordAttribute();
+ Qt3DCore::QAttribute *tangentAttribute = geometry.tangentAttribute();
+ Qt3DCore::QAttribute *indexAttribute = geometry.indexAttribute();
// WHEN
QFETCH(float, xExtent);
@@ -545,7 +545,7 @@ private Q_SLOTS:
// Check buffer of each attribute is valid and actually has some data
for (const auto &attribute : attributes) {
- Qt3DRender::QBuffer *buffer = attribute->buffer();
+ Qt3DCore::QBuffer *buffer = attribute->buffer();
QVERIFY(buffer != nullptr);
QVERIFY(buffer->data().size() != 0);
}
diff --git a/tests/auto/extras/qtorusgeometry/tst_qtorusgeometry.cpp b/tests/auto/extras/qtorusgeometry/tst_qtorusgeometry.cpp
index 7a6965f20..08afd09e3 100644
--- a/tests/auto/extras/qtorusgeometry/tst_qtorusgeometry.cpp
+++ b/tests/auto/extras/qtorusgeometry/tst_qtorusgeometry.cpp
@@ -29,9 +29,9 @@
#include <QtTest/QTest>
#include <QObject>
#include <Qt3DExtras/qtorusgeometry.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <qopenglcontext.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <QtGui/qopenglcontext.h>
#include <QtGui/qvector2d.h>
#include <QtGui/qvector3d.h>
#include <QtGui/qvector4d.h>
@@ -57,14 +57,14 @@ private Q_SLOTS:
QCOMPARE(geometry.radius(), 1.0f);
QCOMPARE(geometry.minorRadius(), 1.0f);
QVERIFY(geometry.positionAttribute() != nullptr);
- QCOMPARE(geometry.positionAttribute()->name(), Qt3DRender::QAttribute::defaultPositionAttributeName());
+ QCOMPARE(geometry.positionAttribute()->name(), Qt3DCore::QAttribute::defaultPositionAttributeName());
QVERIFY(geometry.normalAttribute() != nullptr);
- QCOMPARE(geometry.normalAttribute()->name(), Qt3DRender::QAttribute::defaultNormalAttributeName());
+ QCOMPARE(geometry.normalAttribute()->name(), Qt3DCore::QAttribute::defaultNormalAttributeName());
QVERIFY(geometry.texCoordAttribute() != nullptr);
- QCOMPARE(geometry.texCoordAttribute()->name(), Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
+ QCOMPARE(geometry.texCoordAttribute()->name(), Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
// TODO: Expose tangent attribute in Qt 5.8 and see below
// QVERIFY(geometry.tangentAttribute() != nullptr);
-// QCOMPARE(geometry.tangentAttribute()->name(), Qt3DRender::QAttribute::defaultTangentAttributeName());
+// QCOMPARE(geometry.tangentAttribute()->name(), Qt3DCore::QAttribute::defaultTangentAttributeName());
QVERIFY(geometry.indexAttribute() != nullptr);
}
@@ -299,12 +299,12 @@ private Q_SLOTS:
{
// GIVEN
Qt3DExtras::QTorusGeometry geometry;
- const QVector<Qt3DRender::QAttribute *> attributes = geometry.attributes();
- Qt3DRender::QAttribute *positionAttribute = geometry.positionAttribute();
- Qt3DRender::QAttribute *normalAttribute = geometry.normalAttribute();
- Qt3DRender::QAttribute *texCoordAttribute = geometry.texCoordAttribute();
-// Qt3DRender::QAttribute *tangentAttribute = geometry.tangentAttribute();
- Qt3DRender::QAttribute *indexAttribute = geometry.indexAttribute();
+ const QVector<Qt3DCore::QAttribute *> attributes = geometry.attributes();
+ Qt3DCore::QAttribute *positionAttribute = geometry.positionAttribute();
+ Qt3DCore::QAttribute *normalAttribute = geometry.normalAttribute();
+ Qt3DCore::QAttribute *texCoordAttribute = geometry.texCoordAttribute();
+// Qt3DCore::QAttribute *tangentAttribute = geometry.tangentAttribute();
+ Qt3DCore::QAttribute *indexAttribute = geometry.indexAttribute();
// WHEN
QFETCH(int, rings);
@@ -320,7 +320,7 @@ private Q_SLOTS:
// Check buffer of each attribute is valid and actually has some data
for (const auto &attribute : attributes) {
- Qt3DRender::QBuffer *buffer = attribute->buffer();
+ Qt3DCore::QBuffer *buffer = attribute->buffer();
QVERIFY(buffer != nullptr);
QVERIFY(buffer->data().size() != 0);
}
diff --git a/tests/auto/quick3d/3dcore/3dcore.qml b/tests/auto/quick3d/3dcore/3dcore.qml
index d0a5c6f09..664c29bc9 100644
--- a/tests/auto/quick3d/3dcore/3dcore.qml
+++ b/tests/auto/quick3d/3dcore/3dcore.qml
@@ -50,4 +50,8 @@ Item {
QQ3Core210.Joint {}
QQ3Core214.Transform {}
+
+ QQ3Core20.Attribute {} //Qt3DCore::QAttribute
+ QQ3Core20.Buffer {} //Qt3DCore::Quick::Quick3DBuffer
+ QQ3Core20.Geometry {} //Qt3DCore::QGeometry, Qt3DCore::Quick::Quick3DGeometry
}
diff --git a/tests/auto/quick3d/3drender/3drender.qml b/tests/auto/quick3d/3drender/3drender.qml
index 8c200f3c0..cc0db1ab1 100644
--- a/tests/auto/quick3d/3drender/3drender.qml
+++ b/tests/auto/quick3d/3drender/3drender.qml
@@ -87,10 +87,6 @@ Item {
QQ3Render213.SetFence {} //Qt3DRender::QSetFence
// Geometry
- QQ3Render20.Attribute {} //Qt3DRender::QAttribute
- //QQ3Render20.BufferBase // (uncreatable) Qt3DRender::QBuffer
- QQ3Render20.Buffer {} //Qt3DRender::Render::Quick::Quick3DBuffer
- QQ3Render20.Geometry {} //Qt3DRender::QGeometry, Qt3DRender::Render::Quick::Quick3DGeometry
QQ3Render20.GeometryRenderer {} //Qt3DRender::QGeometryRenderer
// Mesh
diff --git a/tests/auto/quick3d/quick3dbuffer/quick3dbuffer.pro b/tests/auto/quick3d/quick3dbuffer/quick3dbuffer.pro
index f36e42ff5..afcc30d19 100644
--- a/tests/auto/quick3d/quick3dbuffer/quick3dbuffer.pro
+++ b/tests/auto/quick3d/quick3dbuffer/quick3dbuffer.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = tst_quick3dbuffer
-QT += 3dcore 3dcore-private 3drender 3drender-private 3dquick 3dquick-private 3dquickrender-private testlib
+QT += 3dcore 3dcore-private 3dquick 3dquick-private testlib
CONFIG += testcase
diff --git a/tests/auto/quick3d/quick3dbuffer/tst_quick3dbuffer.cpp b/tests/auto/quick3d/quick3dbuffer/tst_quick3dbuffer.cpp
index 0392c0402..21f62ac00 100644
--- a/tests/auto/quick3d/quick3dbuffer/tst_quick3dbuffer.cpp
+++ b/tests/auto/quick3d/quick3dbuffer/tst_quick3dbuffer.cpp
@@ -28,7 +28,7 @@
#include <QtTest/QTest>
-#include <Qt3DQuickRender/private/quick3dbuffer_p.h>
+#include <Qt3DQuick/private/quick3dbuffer_p.h>
#include <QObject>
#include <QVector3D>
@@ -53,7 +53,7 @@ private Q_SLOTS:
void checkInvalidBinaryFile()
{
// GIVEN
- Qt3DRender::Render::Quick::Quick3DBuffer buf;
+ Qt3DCore::Quick::Quick3DBuffer buf;
// WHEN
QVariant data = buf.readBinaryFile(QUrl::fromLocalFile(QLatin1String("this_should_not_exist.bin")));
@@ -66,7 +66,7 @@ private Q_SLOTS:
void checkValidBinaryFile()
{
// GIVEN
- Qt3DRender::Render::Quick::Quick3DBuffer buf;
+ Qt3DCore::Quick::Quick3DBuffer buf;
QVector<QVector3D> dataArray = QVector<QVector3D>()
<< QVector3D(327.0f, 350.0f, 355.0f)
<< QVector3D(383.0f, 427.0f, 454.0f);
diff --git a/tests/auto/render/attribute/tst_attribute.cpp b/tests/auto/render/attribute/tst_attribute.cpp
index 5571ef334..0b47f808d 100644
--- a/tests/auto/render/attribute/tst_attribute.cpp
+++ b/tests/auto/render/attribute/tst_attribute.cpp
@@ -29,7 +29,7 @@
#include <QtTest/QTest>
#include <qbackendnodetester.h>
#include <Qt3DRender/private/attribute_p.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qbuffer.h>
#include "testrenderer.h"
class tst_Attribute : public Qt3DCore::QBackendNodeTester
@@ -45,18 +45,18 @@ private Q_SLOTS:
Qt3DRender::Render::Attribute renderAttribute;
renderAttribute.setRenderer(&renderer);
- Qt3DRender::QAttribute attribute;
- attribute.setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ Qt3DCore::QAttribute attribute;
+ attribute.setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
attribute.setByteOffset(1200);
attribute.setByteStride(883);
attribute.setCount(427);
attribute.setDivisor(305);
attribute.setName(QStringLiteral("C3"));
- attribute.setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ attribute.setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
attribute.setVertexSize(3);
- Qt3DRender::QBuffer buffer;
- buffer.setUsage(Qt3DRender::QBuffer::DynamicCopy);
+ Qt3DCore::QBuffer buffer;
+ buffer.setUsage(Qt3DCore::QBuffer::DynamicCopy);
buffer.setData(QByteArrayLiteral("Corvette"));
attribute.setBuffer(&buffer);
@@ -89,26 +89,26 @@ private Q_SLOTS:
QVERIFY(renderAttribute.bufferId().isNull());
QVERIFY(renderAttribute.name().isEmpty());
QCOMPARE(renderAttribute.isDirty(), false);
- QCOMPARE(renderAttribute.vertexBaseType(), Qt3DRender::QAttribute::Float);
+ QCOMPARE(renderAttribute.vertexBaseType(), Qt3DCore::QAttribute::Float);
QCOMPARE(renderAttribute.vertexSize(), 1U);
- QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::VertexAttribute);
+ QCOMPARE(renderAttribute.attributeType(), Qt3DCore::QAttribute::VertexAttribute);
QCOMPARE(renderAttribute.byteOffset(), 0U);
QCOMPARE(renderAttribute.byteStride(), 0U);
QCOMPARE(renderAttribute.count(), 0U);
QCOMPARE(renderAttribute.divisor(), 0U);
// GIVEN
- Qt3DRender::QAttribute attribute;
- attribute.setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ Qt3DCore::QAttribute attribute;
+ attribute.setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
attribute.setByteOffset(1200);
attribute.setByteStride(883);
attribute.setCount(427);
attribute.setDivisor(305);
attribute.setName(QStringLiteral("C3"));
- attribute.setVertexBaseType(Qt3DRender::QAttribute::Double);
+ attribute.setVertexBaseType(Qt3DCore::QAttribute::Double);
attribute.setVertexSize(4);
- Qt3DRender::QBuffer buffer;
- buffer.setUsage(Qt3DRender::QBuffer::DynamicCopy);
+ Qt3DCore::QBuffer buffer;
+ buffer.setUsage(Qt3DCore::QBuffer::DynamicCopy);
buffer.setData(QByteArrayLiteral("C7"));
attribute.setBuffer(&buffer);
@@ -120,9 +120,9 @@ private Q_SLOTS:
QVERIFY(renderAttribute.bufferId().isNull());
QVERIFY(renderAttribute.name().isEmpty());
QCOMPARE(renderAttribute.isDirty(), false);
- QCOMPARE(renderAttribute.vertexBaseType(), Qt3DRender::QAttribute::Float);
+ QCOMPARE(renderAttribute.vertexBaseType(), Qt3DCore::QAttribute::Float);
QCOMPARE(renderAttribute.vertexSize(), 1U);
- QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::VertexAttribute);
+ QCOMPARE(renderAttribute.attributeType(), Qt3DCore::QAttribute::VertexAttribute);
QCOMPARE(renderAttribute.byteOffset(), 0U);
QCOMPARE(renderAttribute.byteStride(), 0U);
QCOMPARE(renderAttribute.count(), 0U);
@@ -132,7 +132,7 @@ private Q_SLOTS:
void checkPropertyChanges()
{
// GIVEN
- Qt3DRender::QAttribute attribute;
+ Qt3DCore::QAttribute attribute;
TestRenderer renderer;
Qt3DRender::Render::Attribute renderAttribute;
renderAttribute.setRenderer(&renderer);
@@ -144,11 +144,11 @@ private Q_SLOTS:
QVERIFY(!renderer.dirtyBits());
// WHEN
- attribute.setVertexBaseType(Qt3DRender::QAttribute::Int);
+ attribute.setVertexBaseType(Qt3DCore::QAttribute::Int);
renderAttribute.syncFromFrontEnd(&attribute, false);
// THEN
- QCOMPARE(renderAttribute.vertexBaseType(), Qt3DRender::QAttribute::Int);
+ QCOMPARE(renderAttribute.vertexBaseType(), Qt3DCore::QAttribute::Int);
QVERIFY(renderAttribute.isDirty());
QVERIFY(renderer.dirtyBits() != 0);
@@ -171,11 +171,11 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- attribute.setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ attribute.setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
renderAttribute.syncFromFrontEnd(&attribute, false);
// THEN
- QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::IndexAttribute);
+ QCOMPARE(renderAttribute.attributeType(), Qt3DCore::QAttribute::IndexAttribute);
QVERIFY(renderAttribute.isDirty());
QVERIFY(renderer.dirtyBits() != 0);
@@ -184,11 +184,11 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- attribute.setAttributeType(Qt3DRender::QAttribute::DrawIndirectAttribute);
+ attribute.setAttributeType(Qt3DCore::QAttribute::DrawIndirectAttribute);
renderAttribute.syncFromFrontEnd(&attribute, false);
// THEN
- QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::DrawIndirectAttribute);
+ QCOMPARE(renderAttribute.attributeType(), Qt3DCore::QAttribute::DrawIndirectAttribute);
QVERIFY(renderAttribute.isDirty());
QVERIFY(renderer.dirtyBits() != 0);
@@ -262,7 +262,7 @@ private Q_SLOTS:
QVERIFY(!renderAttribute.isDirty());
// WHEN
- auto buffer = new Qt3DRender::QBuffer();
+ auto buffer = new Qt3DCore::QBuffer();
attribute.setBuffer(buffer);
renderAttribute.syncFromFrontEnd(&attribute, false);
diff --git a/tests/auto/render/boundingsphere/tst_boundingsphere.cpp b/tests/auto/render/boundingsphere/tst_boundingsphere.cpp
index 6c5473cff..c929c5cb5 100644
--- a/tests/auto/render/boundingsphere/tst_boundingsphere.cpp
+++ b/tests/auto/render/boundingsphere/tst_boundingsphere.cpp
@@ -422,8 +422,8 @@ private Q_SLOTS:
QScopedPointer<Qt3DCore::QEntity> entity(new Qt3DCore::QEntity);
QScopedPointer<Qt3DRender::TestAspect> test(new Qt3DRender::TestAspect(entity.data()));
- Qt3DRender::QBuffer *vbuffer = new Qt3DRender::QBuffer;
- Qt3DRender::QBuffer *ibuffer = new Qt3DRender::QBuffer;
+ Qt3DCore::QBuffer *vbuffer = new Qt3DCore::QBuffer;
+ Qt3DCore::QBuffer *ibuffer = new Qt3DCore::QBuffer;
vbuffer->setData(vdata);
Qt3DRender::Render::Buffer *vbufferBackend = test->nodeManagers()->bufferManager()->getOrCreateResource(vbuffer->id());
@@ -437,15 +437,15 @@ private Q_SLOTS:
ibufferBackend->setManager(test->nodeManagers()->bufferManager());
simulateInitializationSync(ibuffer, ibufferBackend);
- Qt3DRender::QGeometry *g = new Qt3DRender::QGeometry;
+ Qt3DCore::QGeometry *g = new Qt3DCore::QGeometry;
for (int i = 0; i < 2; ++i)
- g->addAttribute(new Qt3DRender::QAttribute);
+ g->addAttribute(new Qt3DCore::QAttribute);
- const QVector<Qt3DRender::QAttribute *> attrs = g->attributes();
- Qt3DRender::QAttribute *attr = attrs[0];
+ const QVector<Qt3DCore::QAttribute *> attrs = g->attributes();
+ Qt3DCore::QAttribute *attr = attrs[0];
attr->setBuffer(vbuffer);
- attr->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- attr->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ attr->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ attr->setVertexBaseType(Qt3DCore::QAttribute::Float);
attr->setVertexSize(3);
attr->setCount(6);
attr->setByteOffset(0);
@@ -453,8 +453,8 @@ private Q_SLOTS:
attr = attrs[1];
attr->setBuffer(ibuffer);
- attr->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
- attr->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ attr->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
+ attr->setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
attr->setVertexSize(1);
attr->setCount(indexCount);
attr->setByteOffset(indexByteOffset);
@@ -534,7 +534,7 @@ private Q_SLOTS:
QScopedPointer<Qt3DCore::QEntity> entity(new Qt3DCore::QEntity);
QScopedPointer<Qt3DRender::TestAspect> test(new Qt3DRender::TestAspect(entity.data()));
- Qt3DRender::QBuffer *vbuffer = new Qt3DRender::QBuffer;
+ Qt3DCore::QBuffer *vbuffer = new Qt3DCore::QBuffer;
vbuffer->setData(vdata);
Qt3DRender::Render::Buffer *vbufferBackend = test->nodeManagers()->bufferManager()->getOrCreateResource(vbuffer->id());
@@ -542,14 +542,14 @@ private Q_SLOTS:
vbufferBackend->setManager(test->nodeManagers()->bufferManager());
simulateInitializationSync(vbuffer, vbufferBackend);
- Qt3DRender::QGeometry *g = new Qt3DRender::QGeometry;
- g->addAttribute(new Qt3DRender::QAttribute);
+ Qt3DCore::QGeometry *g = new Qt3DCore::QGeometry;
+ g->addAttribute(new Qt3DCore::QAttribute);
- const QVector<Qt3DRender::QAttribute *> attrs = g->attributes();
- Qt3DRender::QAttribute *attr = attrs[0];
+ const QVector<Qt3DCore::QAttribute *> attrs = g->attributes();
+ Qt3DCore::QAttribute *attr = attrs[0];
attr->setBuffer(vbuffer);
- attr->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- attr->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ attr->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ attr->setVertexBaseType(Qt3DCore::QAttribute::Float);
attr->setVertexSize(3);
attr->setCount(6);
attr->setByteOffset(0);
diff --git a/tests/auto/render/buffer/tst_buffer.cpp b/tests/auto/render/buffer/tst_buffer.cpp
index b9284623d..1746b81f8 100644
--- a/tests/auto/render/buffer/tst_buffer.cpp
+++ b/tests/auto/render/buffer/tst_buffer.cpp
@@ -26,14 +26,10 @@
**
****************************************************************************/
-// TODO Remove in Qt6
-#include <QtCore/qcompilerdetection.h>
-QT_WARNING_DISABLE_DEPRECATED
-
#include <QtTest/QTest>
#include <qbackendnodetester.h>
#include <Qt3DRender/private/buffer_p.h>
-#include <Qt3DRender/private/qbuffer_p.h>
+#include <Qt3DCore/private/qbuffer_p.h>
#include <Qt3DRender/private/buffermanager_p.h>
#include <Qt3DCore/private/qbackendnode_p.h>
#include "testarbiter.h"
@@ -49,11 +45,11 @@ private Q_SLOTS:
{
// GIVEN
Qt3DRender::Render::Buffer renderBuffer;
- Qt3DRender::QBuffer buffer;
+ Qt3DCore::QBuffer buffer;
Qt3DRender::Render::BufferManager bufferManager;
TestRenderer renderer;
- buffer.setUsage(Qt3DRender::QBuffer::DynamicCopy);
+ buffer.setUsage(Qt3DCore::QBuffer::DynamicCopy);
buffer.setData(QByteArrayLiteral("Corvette"));
// WHEN
@@ -79,13 +75,13 @@ private Q_SLOTS:
// THEN
QCOMPARE(backendBuffer.isDirty(), false);
- QCOMPARE(backendBuffer.usage(), Qt3DRender::QBuffer::StaticDraw);
+ QCOMPARE(backendBuffer.usage(), Qt3DCore::QBuffer::StaticDraw);
QVERIFY(backendBuffer.data().isEmpty());
QVERIFY(backendBuffer.peerId().isNull());
QVERIFY(backendBuffer.pendingBufferUpdates().empty());
// GIVEN
- Qt3DRender::QBuffer frontendBuffer;
+ Qt3DCore::QBuffer frontendBuffer;
// WHEN
backendBuffer.setManager(&bufferManager);
@@ -94,17 +90,17 @@ private Q_SLOTS:
// THEN
QCOMPARE(backendBuffer.isDirty(), true);
- QCOMPARE(backendBuffer.usage(), Qt3DRender::QBuffer::StaticDraw);
+ QCOMPARE(backendBuffer.usage(), Qt3DCore::QBuffer::StaticDraw);
QVERIFY(backendBuffer.data().isEmpty());
QVERIFY(backendBuffer.pendingBufferUpdates().empty());
// WHEN
- frontendBuffer.setUsage(Qt3DRender::QBuffer::DynamicCopy);
+ frontendBuffer.setUsage(Qt3DCore::QBuffer::DynamicCopy);
frontendBuffer.setData(QByteArrayLiteral("C7KR4"));
backendBuffer.syncFromFrontEnd(&frontendBuffer, false);
// THEN
- QCOMPARE(backendBuffer.usage(), Qt3DRender::QBuffer::DynamicCopy);
+ QCOMPARE(backendBuffer.usage(), Qt3DCore::QBuffer::DynamicCopy);
QCOMPARE(backendBuffer.isDirty(), true);
QCOMPARE(backendBuffer.data(), QByteArrayLiteral("C7KR4"));
QVERIFY(!backendBuffer.pendingBufferUpdates().empty());
@@ -121,7 +117,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(backendBuffer.isDirty(), false);
- QCOMPARE(backendBuffer.usage(), Qt3DRender::QBuffer::StaticDraw);
+ QCOMPARE(backendBuffer.usage(), Qt3DCore::QBuffer::StaticDraw);
QVERIFY(backendBuffer.data().isEmpty());
QVERIFY(backendBuffer.pendingBufferUpdates().empty());
}
@@ -133,7 +129,7 @@ private Q_SLOTS:
Qt3DRender::Render::Buffer backendBuffer;
Qt3DRender::Render::BufferManager bufferManager;
TestRenderer renderer;
- Qt3DRender::QBuffer frontendBuffer;
+ Qt3DCore::QBuffer frontendBuffer;
QByteArray data("111456789\0");
@@ -150,7 +146,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(backendBuffer.pendingBufferUpdates().size(), 1);
- Qt3DRender::QBufferUpdate fullUpdate = backendBuffer.pendingBufferUpdates().first();
+ Qt3DCore::QBufferUpdate fullUpdate = backendBuffer.pendingBufferUpdates().first();
QCOMPARE(fullUpdate.offset, -1);
QVERIFY(fullUpdate.data.isEmpty());
QCOMPARE(frontendBuffer.data(), backendBuffer.data());
@@ -185,24 +181,24 @@ private Q_SLOTS:
{
// GIVEN
TestRenderer renderer;
- Qt3DRender::QBuffer frontendBuffer;
+ Qt3DCore::QBuffer frontendBuffer;
Qt3DRender::Render::Buffer backendBuffer;
backendBuffer.setRenderer(&renderer);
simulateInitializationSync(&frontendBuffer, &backendBuffer);
// THEN
QVERIFY(backendBuffer.data().isEmpty());
- QVERIFY(backendBuffer.usage() != Qt3DRender::QBuffer::DynamicRead);
+ QVERIFY(backendBuffer.usage() != Qt3DCore::QBuffer::DynamicRead);
QVERIFY(!backendBuffer.isDirty());
QVERIFY(renderer.dirtyBits() & Qt3DRender::Render::AbstractRenderer::BuffersDirty);
renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty);
// WHEN
- frontendBuffer.setUsage(Qt3DRender::QBuffer::DynamicRead);
+ frontendBuffer.setUsage(Qt3DCore::QBuffer::DynamicRead);
backendBuffer.syncFromFrontEnd(&frontendBuffer, false);
// THEN
- QCOMPARE(backendBuffer.usage(), Qt3DRender::QBuffer::DynamicRead);
+ QCOMPARE(backendBuffer.usage(), Qt3DCore::QBuffer::DynamicRead);
QVERIFY(backendBuffer.isDirty());
QVERIFY(renderer.dirtyBits() & Qt3DRender::Render::AbstractRenderer::BuffersDirty);
@@ -252,7 +248,7 @@ private Q_SLOTS:
{
// GIVEN
Qt3DRender::Render::Buffer renderBuffer;
- Qt3DRender::QBuffer buffer;
+ Qt3DCore::QBuffer buffer;
Qt3DRender::Render::BufferManager bufferManager;
TestRenderer renderer;
@@ -278,7 +274,7 @@ private Q_SLOTS:
{
// GIVEN
Qt3DRender::Render::Buffer renderBuffer;
- Qt3DRender::QBuffer buffer;
+ Qt3DCore::QBuffer buffer;
Qt3DRender::Render::BufferManager bufferManager;
TestRenderer renderer;
diff --git a/tests/auto/render/coordinatereader/tst_coordinatereader.cpp b/tests/auto/render/coordinatereader/tst_coordinatereader.cpp
index 417684245..9ff37f878 100644
--- a/tests/auto/render/coordinatereader/tst_coordinatereader.cpp
+++ b/tests/auto/render/coordinatereader/tst_coordinatereader.cpp
@@ -29,7 +29,7 @@
#include <QtTest/QTest>
#include <qbackendnodetester.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qbuffer.h>
#include <private/trianglesvisitor_p.h>
#include <private/nodemanagers_p.h>
#include <private/managers_p.h>
@@ -115,11 +115,11 @@ private Q_SLOTS:
void checkSetGeometry()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(
new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestReader reader(nodeManagers.data());
TestRenderer renderer;
@@ -152,13 +152,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3 * 4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -182,13 +182,13 @@ private Q_SLOTS:
// WHEN
bool ret = reader.setGeometry(backendRenderer,
- Qt3DRender::QAttribute::defaultPositionAttributeName());
+ Qt3DCore::QAttribute::defaultPositionAttributeName());
// THEN
QCOMPARE(ret, true);
QCOMPARE(reader.attribute(), backendAttribute);
QCOMPARE(reader.buffer(), backendBuffer);
- QCOMPARE(reader.bufferInfo().type, Qt3DRender::QAttribute::Float);
+ QCOMPARE(reader.bufferInfo().type, Qt3DCore::QAttribute::Float);
QCOMPARE(reader.bufferInfo().dataSize, 3u);
QCOMPARE(reader.bufferInfo().count, 6u);
QCOMPARE(reader.bufferInfo().byteStride, 12u);
@@ -198,11 +198,11 @@ private Q_SLOTS:
void testReadCoordinate()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(
new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestReader reader(nodeManagers.data());
TestRenderer renderer;
@@ -235,13 +235,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3 * 4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -265,7 +265,7 @@ private Q_SLOTS:
// WHEN
bool ret = reader.setGeometry(backendRenderer,
- Qt3DRender::QAttribute::defaultPositionAttributeName());
+ Qt3DCore::QAttribute::defaultPositionAttributeName());
// THEN
QCOMPARE(ret, true);
@@ -281,11 +281,11 @@ private Q_SLOTS:
void testReadCoordinateVec4()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(
new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestReader reader(nodeManagers.data());
TestRenderer renderer;
@@ -329,13 +329,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(4);
positionAttribute->setCount(6);
positionAttribute->setByteStride(4 * 4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -359,7 +359,7 @@ private Q_SLOTS:
// WHEN
bool ret = reader.setGeometry(backendRenderer,
- Qt3DRender::QAttribute::defaultPositionAttributeName());
+ Qt3DCore::QAttribute::defaultPositionAttributeName());
// THEN
QCOMPARE(ret, true);
@@ -375,12 +375,12 @@ private Q_SLOTS:
void testReadCoordinateFromAttribute()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(
new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> texcoordAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> texcoordAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestReader reader(nodeManagers.data());
TestRenderer renderer;
@@ -418,23 +418,23 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(3);
positionAttribute->setByteStride(3 * 4 * 2);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
texcoordAttribute->setBuffer(dataBuffer.data());
- texcoordAttribute->setName(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
- texcoordAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ texcoordAttribute->setName(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
+ texcoordAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
texcoordAttribute->setVertexSize(3);
texcoordAttribute->setCount(6);
texcoordAttribute->setByteStride(3 * 4 * 2);
texcoordAttribute->setByteOffset(3 * 4);
- texcoordAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ texcoordAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(texcoordAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -463,7 +463,7 @@ private Q_SLOTS:
// WHEN
bool ret = reader.setGeometry(backendRenderer,
- Qt3DRender::QAttribute::defaultPositionAttributeName());
+ Qt3DCore::QAttribute::defaultPositionAttributeName());
// THEN
QCOMPARE(ret, true);
@@ -474,7 +474,7 @@ private Q_SLOTS:
// WHEN
ret = reader.setGeometry(backendRenderer,
- Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
+ Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
// THEN
QCOMPARE(ret, true);
diff --git a/tests/auto/render/geometry/tst_geometry.cpp b/tests/auto/render/geometry/tst_geometry.cpp
index 9355f8339..aa856da39 100644
--- a/tests/auto/render/geometry/tst_geometry.cpp
+++ b/tests/auto/render/geometry/tst_geometry.cpp
@@ -33,18 +33,18 @@ QT_WARNING_DISABLE_DEPRECATED
#include <QtTest/QTest>
#include <qbackendnodetester.h>
#include <Qt3DRender/private/geometry_p.h>
-#include <Qt3DRender/qgeometry.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qgeometry.h>
+#include <Qt3DCore/qattribute.h>
#include <Qt3DCore/private/qbackendnode_p.h>
#include "testrenderer.h"
#include "testarbiter.h"
-class DummyAttribute : public Qt3DRender::QAttribute
+class DummyAttribute : public Qt3DCore::QAttribute
{
Q_OBJECT
public:
DummyAttribute(Qt3DCore::QNode *parent = nullptr)
- : Qt3DRender::QAttribute(parent)
+ : Qt3DCore::QAttribute(parent)
{}
};
@@ -60,11 +60,11 @@ private Q_SLOTS:
Qt3DRender::Render::Geometry renderGeometry;
TestRenderer renderer;
- Qt3DRender::QGeometry geometry;
- Qt3DRender::QAttribute attr1;
- Qt3DRender::QAttribute attr2;
- Qt3DRender::QAttribute attr4;
- Qt3DRender::QAttribute attr3;
+ Qt3DCore::QGeometry geometry;
+ Qt3DCore::QAttribute attr1;
+ Qt3DCore::QAttribute attr2;
+ Qt3DCore::QAttribute attr4;
+ Qt3DCore::QAttribute attr3;
geometry.addAttribute(&attr1);
geometry.addAttribute(&attr2);
@@ -91,7 +91,7 @@ private Q_SLOTS:
{
// GIVEN
Qt3DRender::Render::Geometry renderGeometry;
- Qt3DRender::QGeometry geometry;
+ Qt3DCore::QGeometry geometry;
TestRenderer renderer;
renderGeometry.setRenderer(&renderer);
@@ -120,11 +120,11 @@ private Q_SLOTS:
QCOMPARE(renderGeometry.boundingPositionAttribute(), Qt3DCore::QNodeId());
// GIVEN
- Qt3DRender::QGeometry geometry;
- Qt3DRender::QAttribute attr1;
- Qt3DRender::QAttribute attr2;
- Qt3DRender::QAttribute attr4;
- Qt3DRender::QAttribute attr3;
+ Qt3DCore::QGeometry geometry;
+ Qt3DCore::QAttribute attr1;
+ Qt3DCore::QAttribute attr2;
+ Qt3DCore::QAttribute attr4;
+ Qt3DCore::QAttribute attr3;
geometry.setBoundingVolumePositionAttribute(&attr1);
geometry.addAttribute(&attr1);
@@ -148,7 +148,7 @@ private Q_SLOTS:
TestRenderer renderer;
Qt3DRender::Render::Geometry renderGeometry;
renderGeometry.setRenderer(&renderer);
- Qt3DRender::QGeometry geometry;
+ Qt3DCore::QGeometry geometry;
simulateInitializationSync(&geometry, &renderGeometry);
diff --git a/tests/auto/render/geometryloaders/tst_geometryloaders.cpp b/tests/auto/render/geometryloaders/tst_geometryloaders.cpp
index 07545403d..7fc914cda 100644
--- a/tests/auto/render/geometryloaders/tst_geometryloaders.cpp
+++ b/tests/auto/render/geometryloaders/tst_geometryloaders.cpp
@@ -42,14 +42,15 @@
#include <QtCore/QScopedPointer>
#include <QtCore/private/qfactoryloader_p.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/private/qgeometryloaderfactory_p.h>
#include <Qt3DRender/private/qgeometryloaderinterface_p.h>
#include "../../../../src/plugins/geometryloaders/qtgeometryloaders-config.h"
+using namespace Qt3DCore;
using namespace Qt3DRender;
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, geometryLoader,
diff --git a/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp b/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
index 111b0a3ba..9d236b516 100644
--- a/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
+++ b/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
@@ -26,23 +26,19 @@
**
****************************************************************************/
-// TODO Remove in Qt6
-#include <QtCore/qcompilerdetection.h>
-QT_WARNING_DISABLE_DEPRECATED
-
#include <QtTest/QTest>
#include <qbackendnodetester.h>
#include <Qt3DRender/private/geometryrenderer_p.h>
#include <Qt3DRender/private/geometryrenderermanager_p.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include "testrenderer.h"
-class DummyGeometry : public Qt3DRender::QGeometry
+class DummyGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
public:
DummyGeometry(Qt3DCore::QNode *parent = nullptr)
- : Qt3DRender::QGeometry(parent)
+ : Qt3DCore::QGeometry(parent)
{}
};
@@ -57,7 +53,7 @@ private Q_SLOTS:
// GIVEN
Qt3DRender::Render::GeometryRenderer renderGeometryRenderer;
Qt3DRender::QGeometryRenderer geometryRenderer;
- Qt3DRender::QGeometry geometry;
+ Qt3DCore::QGeometry geometry;
Qt3DRender::Render::GeometryRendererManager geometryRendererManager;
TestRenderer renderer;
@@ -115,7 +111,7 @@ private Q_SLOTS:
// GIVEN
Qt3DRender::QGeometryRenderer geometryRenderer;
- Qt3DRender::QGeometry geometry;
+ Qt3DCore::QGeometry geometry;
TestRenderer renderer;
geometryRenderer.setInstanceCount(454);
diff --git a/tests/auto/render/gltfplugins/tst_gltfplugins.cpp b/tests/auto/render/gltfplugins/tst_gltfplugins.cpp
index 7f40fffcc..26dddf12f 100644
--- a/tests/auto/render/gltfplugins/tst_gltfplugins.cpp
+++ b/tests/auto/render/gltfplugins/tst_gltfplugins.cpp
@@ -56,8 +56,8 @@
#include <Qt3DRender/qspotlight.h>
#include <Qt3DRender/qdirectionallight.h>
#include <Qt3DRender/qpointlight.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <Qt3DRender/qeffect.h>
#include <Qt3DRender/qshaderprogram.h>
#include <Qt3DRender/qtechnique.h>
@@ -111,12 +111,12 @@ private:
Qt3DCore::QComponent *comp2 = nullptr,
Qt3DCore::QComponent *comp3 = nullptr,
Qt3DCore::QEntity *parent = nullptr);
- void addPositionAttributeToGeometry(Qt3DRender::QGeometry *geometry,
- Qt3DRender::QBuffer *buffer, int count);
- void addIndexAttributeToGeometry(Qt3DRender::QGeometry *geometry,
- Qt3DRender::QBuffer *buffer, int count);
- void addColorAttributeToGeometry(Qt3DRender::QGeometry *geometry,
- Qt3DRender::QBuffer *buffer, int count);
+ void addPositionAttributeToGeometry(Qt3DCore::QGeometry *geometry,
+ Qt3DCore::QBuffer *buffer, int count);
+ void addIndexAttributeToGeometry(Qt3DCore::QGeometry *geometry,
+ Qt3DCore::QBuffer *buffer, int count);
+ void addColorAttributeToGeometry(Qt3DCore::QGeometry *geometry,
+ Qt3DCore::QBuffer *buffer, int count);
Qt3DCore::QEntity *findChildEntity(Qt3DCore::QEntity *entity, const QString &name);
Qt3DCore::QTransform *transformComponent(Qt3DCore::QEntity *entity);
Qt3DRender::QAbstractLight *lightComponent(Qt3DCore::QEntity *entity);
@@ -124,10 +124,10 @@ private:
Qt3DRender::QGeometryRenderer *meshComponent(Qt3DCore::QEntity *entity);
Qt3DRender::QMaterial *materialComponent(Qt3DCore::QEntity *entity);
void compareComponents(Qt3DCore::QComponent *c1, Qt3DCore::QComponent *c2);
- Qt3DRender::QAttribute *findAttribute(const QString &name,
- Qt3DRender::QAttribute::AttributeType type,
- Qt3DRender::QGeometry *geometry);
- void compareAttributes(Qt3DRender::QAttribute *a1, Qt3DRender::QAttribute *a2);
+ Qt3DCore::QAttribute *findAttribute(const QString &name,
+ Qt3DCore::QAttribute::AttributeType type,
+ Qt3DCore::QGeometry *geometry);
+ void compareAttributes(Qt3DCore::QAttribute *a1, Qt3DCore::QAttribute *a2);
void compareParameters(const QVector<Qt3DRender::QParameter *> &params1,
const QVector<Qt3DRender::QParameter *> &params2);
void compareRenderPasses(const QVector<Qt3DRender::QRenderPass *> &passes1,
@@ -515,8 +515,8 @@ void tst_gltfPlugins::createTestScene()
transform->setRotation(Qt3DCore::QTransform::fromAxisAndAngle(1.0f, 1.0f, 1.0f, 270.0f));
Qt3DRender::QGeometryRenderer *boxMesh = createCustomCube();
- Qt3DRender::QBuffer *colorDataBuffer =
- new Qt3DRender::QBuffer(boxMesh->geometry());
+ Qt3DCore::QBuffer *colorDataBuffer =
+ new Qt3DCore::QBuffer(boxMesh->geometry());
QByteArray colorBufferData;
colorBufferData.resize(8 * 4 * sizeof(float));
@@ -570,8 +570,8 @@ void tst_gltfPlugins::createTestScene()
transform->setTranslation(QVector3D(0.0f, 2.0f, -40.0f));
transform->setRotation(Qt3DCore::QTransform::fromAxisAndAngle(1.0f, 2.0f, 3.0f, 90.0f));
Qt3DRender::QGeometryRenderer *boxMesh = createCustomCube();
- Qt3DRender::QBuffer *offsetBuffer =
- new Qt3DRender::QBuffer(boxMesh->geometry());
+ Qt3DCore::QBuffer *offsetBuffer =
+ new Qt3DCore::QBuffer(boxMesh->geometry());
QByteArray offsetBufferData;
offsetBufferData.resize(8 * 3 * sizeof(float));
@@ -584,10 +584,10 @@ void tst_gltfPlugins::createTestScene()
offsetBuffer->setData(offsetBufferData);
- Qt3DRender::QAttribute *customAttribute = new Qt3DRender::QAttribute();
- customAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *customAttribute = new Qt3DCore::QAttribute();
+ customAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
customAttribute->setBuffer(offsetBuffer);
- customAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ customAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
customAttribute->setVertexSize(3);
customAttribute->setByteOffset(0);
customAttribute->setByteStride(0);
@@ -614,29 +614,29 @@ void tst_gltfPlugins::createTestScene()
#endif
}
-void tst_gltfPlugins::addPositionAttributeToGeometry(Qt3DRender::QGeometry *geometry,
- Qt3DRender::QBuffer *buffer, int count)
+void tst_gltfPlugins::addPositionAttributeToGeometry(Qt3DCore::QGeometry *geometry,
+ Qt3DCore::QBuffer *buffer, int count)
{
- Qt3DRender::QAttribute *posAttribute = new Qt3DRender::QAttribute();
- posAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *posAttribute = new Qt3DCore::QAttribute();
+ posAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
posAttribute->setBuffer(buffer);
- posAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ posAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
posAttribute->setVertexSize(3);
posAttribute->setByteOffset(0);
posAttribute->setByteStride(0);
posAttribute->setCount(count);
- posAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
+ posAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
geometry->addAttribute(posAttribute);
}
-void tst_gltfPlugins::addIndexAttributeToGeometry(Qt3DRender::QGeometry *geometry,
- Qt3DRender::QBuffer *buffer, int count)
+void tst_gltfPlugins::addIndexAttributeToGeometry(Qt3DCore::QGeometry *geometry,
+ Qt3DCore::QBuffer *buffer, int count)
{
- Qt3DRender::QAttribute *indexAttribute = new Qt3DRender::QAttribute();
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ Qt3DCore::QAttribute *indexAttribute = new Qt3DCore::QAttribute();
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
indexAttribute->setBuffer(buffer);
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
indexAttribute->setVertexSize(1);
indexAttribute->setByteOffset(0);
indexAttribute->setByteStride(0);
@@ -645,18 +645,18 @@ void tst_gltfPlugins::addIndexAttributeToGeometry(Qt3DRender::QGeometry *geometr
geometry->addAttribute(indexAttribute);
}
-void tst_gltfPlugins::addColorAttributeToGeometry(Qt3DRender::QGeometry *geometry,
- Qt3DRender::QBuffer *buffer, int count)
+void tst_gltfPlugins::addColorAttributeToGeometry(Qt3DCore::QGeometry *geometry,
+ Qt3DCore::QBuffer *buffer, int count)
{
- Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute();
- colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *colorAttribute = new Qt3DCore::QAttribute();
+ colorAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
colorAttribute->setBuffer(buffer);
- colorAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ colorAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
colorAttribute->setVertexSize(4);
colorAttribute->setByteOffset(0);
colorAttribute->setByteStride(0);
colorAttribute->setCount(count);
- colorAttribute->setName(Qt3DRender::QAttribute::defaultColorAttributeName());
+ colorAttribute->setName(Qt3DCore::QAttribute::defaultColorAttributeName());
geometry->addAttribute(colorAttribute);
}
@@ -736,46 +736,46 @@ void tst_gltfPlugins::compareComponents(Qt3DCore::QComponent *c1, Qt3DCore::QCom
auto geometry2 = mesh2->geometry();
// Check that attributes match.
compareAttributes(
- findAttribute(Qt3DRender::QAttribute::defaultPositionAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultPositionAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry1),
- findAttribute(Qt3DRender::QAttribute::defaultPositionAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultPositionAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry2));
compareAttributes(
- findAttribute(Qt3DRender::QAttribute::defaultNormalAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultNormalAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry1),
- findAttribute(Qt3DRender::QAttribute::defaultNormalAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultNormalAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry2));
compareAttributes(
- findAttribute(Qt3DRender::QAttribute::defaultTangentAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultTangentAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry1),
- findAttribute(Qt3DRender::QAttribute::defaultTangentAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultTangentAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry2));
compareAttributes(
- findAttribute(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry1),
- findAttribute(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry2));
compareAttributes(
- findAttribute(Qt3DRender::QAttribute::defaultColorAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultColorAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry1),
- findAttribute(Qt3DRender::QAttribute::defaultColorAttributeName(),
- Qt3DRender::QAttribute::VertexAttribute,
+ findAttribute(Qt3DCore::QAttribute::defaultColorAttributeName(),
+ Qt3DCore::QAttribute::VertexAttribute,
geometry2));
compareAttributes(
findAttribute(QStringLiteral(""),
- Qt3DRender::QAttribute::IndexAttribute,
+ Qt3DCore::QAttribute::IndexAttribute,
geometry1),
findAttribute(QStringLiteral(""),
- Qt3DRender::QAttribute::IndexAttribute,
+ Qt3DCore::QAttribute::IndexAttribute,
geometry2));
} else {
int count = c1->metaObject()->propertyCount();
@@ -840,12 +840,12 @@ void tst_gltfPlugins::compareComponents(Qt3DCore::QComponent *c1, Qt3DCore::QCom
}
}
-Qt3DRender::QAttribute *tst_gltfPlugins::findAttribute(const QString &name,
- Qt3DRender::QAttribute::AttributeType type,
- Qt3DRender::QGeometry *geometry)
+Qt3DCore::QAttribute *tst_gltfPlugins::findAttribute(const QString &name,
+ Qt3DCore::QAttribute::AttributeType type,
+ Qt3DCore::QGeometry *geometry)
{
for (auto att : geometry->attributes()) {
- if ((type == Qt3DRender::QAttribute::IndexAttribute && type == att->attributeType())
+ if ((type == Qt3DCore::QAttribute::IndexAttribute && type == att->attributeType())
|| name == att->name()) {
return att;
}
@@ -853,7 +853,7 @@ Qt3DRender::QAttribute *tst_gltfPlugins::findAttribute(const QString &name,
return nullptr;
}
-void tst_gltfPlugins::compareAttributes(Qt3DRender::QAttribute *a1, Qt3DRender::QAttribute *a2)
+void tst_gltfPlugins::compareAttributes(Qt3DCore::QAttribute *a1, Qt3DCore::QAttribute *a2)
{
QCOMPARE(a1 == nullptr, a2 == nullptr);
if (a1) {
@@ -962,11 +962,11 @@ QUrl tst_gltfPlugins::getTextureUrl(Qt3DRender::QAbstractTexture *tex)
Qt3DRender::QGeometryRenderer *tst_gltfPlugins::createCustomCube()
{
Qt3DRender::QGeometryRenderer *boxMesh = new Qt3DRender::QGeometryRenderer;
- Qt3DRender::QGeometry *boxGeometry = new Qt3DRender::QGeometry(boxMesh);
- Qt3DRender::QBuffer *boxDataBuffer =
- new Qt3DRender::QBuffer(boxGeometry);
- Qt3DRender::QBuffer *indexDataBuffer =
- new Qt3DRender::QBuffer(boxGeometry);
+ Qt3DCore::QGeometry *boxGeometry = new Qt3DCore::QGeometry(boxMesh);
+ Qt3DCore::QBuffer *boxDataBuffer =
+ new Qt3DCore::QBuffer(boxGeometry);
+ Qt3DCore::QBuffer *indexDataBuffer =
+ new Qt3DCore::QBuffer(boxGeometry);
QByteArray vertexBufferData;
QByteArray indexBufferData;
diff --git a/tests/auto/render/meshfunctors/tst_meshfunctors.cpp b/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
index e8dfaa2cb..96341ce23 100644
--- a/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
+++ b/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
@@ -26,19 +26,14 @@
**
****************************************************************************/
-// TODO Remove in Qt6
-#include <QtCore/qcompilerdetection.h>
-QT_WARNING_DISABLE_DEPRECATED
-
#include <QtTest/QtTest>
#include <Qt3DCore/qcomponent.h>
-#include <Qt3DRender/private/qgeometryfactory_p.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/qmesh.h>
#include <Qt3DRender/private/qmesh_p.h>
#include <Qt3DCore/qaspectengine.h>
-class MeshFunctorA : public Qt3DRender::QGeometryFactory
+class MeshFunctorA : public Qt3DCore::QGeometryFactory
{
public:
MeshFunctorA()
@@ -47,20 +42,20 @@ public:
~MeshFunctorA()
{}
- Qt3DRender::QGeometry *operator ()() override
+ Qt3DCore::QGeometry *operator ()() override
{
return nullptr;
}
- bool operator ==(const Qt3DRender::QGeometryFactory &other) const override
+ bool operator ==(const Qt3DCore::QGeometryFactory &other) const override
{
- return Qt3DRender::functor_cast<MeshFunctorA>(&other);
+ return Qt3DCore::functor_cast<MeshFunctorA>(&other);
}
QT3D_FUNCTOR(MeshFunctorA)
};
-class MeshFunctorB : public Qt3DRender::QGeometryFactory
+class MeshFunctorB : public Qt3DCore::QGeometryFactory
{
public:
MeshFunctorB()
@@ -69,14 +64,14 @@ public:
~MeshFunctorB()
{}
- Qt3DRender::QGeometry *operator ()() override
+ Qt3DCore::QGeometry *operator ()() override
{
return nullptr;
}
- bool operator ==(const Qt3DRender::QGeometryFactory &other) const override
+ bool operator ==(const Qt3DCore::QGeometryFactory &other) const override
{
- return Qt3DRender::functor_cast<MeshFunctorB>(&other);
+ return Qt3DCore::functor_cast<MeshFunctorB>(&other);
}
QT3D_FUNCTOR(MeshFunctorB)
@@ -91,9 +86,9 @@ public:
~MeshFunctorASub()
{}
- bool operator ==(const Qt3DRender::QGeometryFactory &other) const override
+ bool operator ==(const Qt3DCore::QGeometryFactory &other) const override
{
- return Qt3DRender::functor_cast<MeshFunctorASub>(&other);
+ return Qt3DCore::functor_cast<MeshFunctorASub>(&other);
}
QT3D_FUNCTOR(MeshFunctorASub)
@@ -190,7 +185,7 @@ private Q_SLOTS:
Qt3DRender::MeshLoaderFunctor functor(&mesh);
// WHEN
- const Qt3DRender::QGeometry *g = functor();
+ const Qt3DCore::QGeometry *g = functor();
// THEN
QVERIFY(g == nullptr);
@@ -204,7 +199,7 @@ private Q_SLOTS:
Qt3DRender::MeshLoaderFunctor functor(&mesh);
// WHEN
- const Qt3DRender::QGeometry *g = functor();
+ const Qt3DCore::QGeometry *g = functor();
// THEN
QVERIFY(g == nullptr);
@@ -218,7 +213,7 @@ private Q_SLOTS:
Qt3DRender::MeshLoaderFunctor functor(&mesh);
// WHEN
- const Qt3DRender::QGeometry *g = functor();
+ const Qt3DCore::QGeometry *g = functor();
// THEN
QVERIFY(g == nullptr);
diff --git a/tests/auto/render/opengl/textures/tst_textures.cpp b/tests/auto/render/opengl/textures/tst_textures.cpp
index 5fb00f23d..c9504cbbf 100644
--- a/tests/auto/render/opengl/textures/tst_textures.cpp
+++ b/tests/auto/render/opengl/textures/tst_textures.cpp
@@ -62,7 +62,7 @@ public:
}
bool operator ==(const Qt3DRender::QTextureImageDataGenerator &other) const override {
- const TestImageDataGenerator *otherFunctor = Qt3DRender::functor_cast<TestImageDataGenerator>(&other);
+ const TestImageDataGenerator *otherFunctor = Qt3DCore::functor_cast<TestImageDataGenerator>(&other);
return (otherFunctor != nullptr && otherFunctor->m_id == m_id);
}
@@ -83,7 +83,7 @@ public:
}
bool operator ==(const Qt3DRender::QTextureGenerator &other) const override {
- const TestTextureGenerator *otherFunctor = Qt3DRender::functor_cast<TestTextureGenerator>(&other);
+ const TestTextureGenerator *otherFunctor = Qt3DCore::functor_cast<TestTextureGenerator>(&other);
return (otherFunctor != nullptr && otherFunctor->m_id == m_id);
}
diff --git a/tests/auto/render/picking/tst_picking.cpp b/tests/auto/render/picking/tst_picking.cpp
index acc9664bf..b38aa3695 100644
--- a/tests/auto/render/picking/tst_picking.cpp
+++ b/tests/auto/render/picking/tst_picking.cpp
@@ -36,8 +36,8 @@
#include <Qt3DRender/qobjectpicker.h>
#include <Qt3DRender/private/qobjectpicker_p.h>
#include <Qt3DExtras/qspheremesh.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <Qt3DExtras/qspheregeometry.h>
#include <Qt3DRender/qpickevent.h>
@@ -72,7 +72,7 @@ public:
mesh->setRadius(radius);
QSphereGeometry *g = static_cast<QSphereGeometry *>(mesh->geometry());
QAttribute *positionAttr = static_cast<QAttribute *>(g->attributes().first());
- Qt3DRender::QBuffer *vertexBuffer = static_cast<Qt3DRender::QBuffer *>(positionAttr->buffer());
+ Qt3DCore::QBuffer *vertexBuffer = static_cast<Qt3DCore::QBuffer *>(positionAttr->buffer());
transform->setTranslation(position);
diff --git a/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp b/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp
index 51b59bffc..ee0be6647 100644
--- a/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp
+++ b/tests/auto/render/proximityfiltering/tst_proximityfiltering.cpp
@@ -29,10 +29,10 @@
#include <QtTest/QTest>
#include <Qt3DCore/qentity.h>
#include <Qt3DCore/qtransform.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qgeometry.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <Qt3DRender/private/nodemanagers_p.h>
#include <Qt3DRender/private/managers_p.h>
#include <Qt3DRender/private/entity_p.h>
@@ -53,13 +53,13 @@ Qt3DCore::QEntity *buildEntityAtDistance(float distance, Qt3DCore::QEntity *pare
Qt3DCore::QEntity *entity = new Qt3DCore::QEntity(parent);
// create geometry with a valid bounding volume - a single point is sufficient
- auto geometry = new Qt3DRender::QGeometry;
- auto vertexBuffer = new Qt3DRender::QBuffer(geometry);
+ auto geometry = new Qt3DCore::QGeometry;
+ auto vertexBuffer = new Qt3DCore::QBuffer(geometry);
- auto positionAttribute = new Qt3DRender::QAttribute;
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ auto positionAttribute = new Qt3DCore::QAttribute;
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setByteStride(3 * sizeof(float));
positionAttribute->setBuffer(vertexBuffer);
diff --git a/tests/auto/render/qattribute/tst_qattribute.cpp b/tests/auto/render/qattribute/tst_qattribute.cpp
index 44793ce9f..8cc3f1b8c 100644
--- a/tests/auto/render/qattribute/tst_qattribute.cpp
+++ b/tests/auto/render/qattribute/tst_qattribute.cpp
@@ -30,9 +30,9 @@
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qscene_p.h>
-#include <Qt3DRender/QAttribute>
-#include <Qt3DRender/private/qattribute_p.h>
-#include <Qt3DRender/QBuffer>
+#include <Qt3DCore/QAttribute>
+#include <Qt3DCore/private/qattribute_p.h>
+#include <Qt3DCore/QBuffer>
#include "testarbiter.h"
@@ -42,49 +42,49 @@ class tst_QAttribute: public QObject
public:
tst_QAttribute()
{
- qRegisterMetaType<Qt3DRender::QBuffer*>("Qt3DCore::QBuffer*");
+ qRegisterMetaType<Qt3DCore::QBuffer*>("Qt3DCore::QBuffer*");
}
private Q_SLOTS:
void shouldHaveDefaultAttributeNames()
{
// GIVEN
- Qt3DRender::QAttribute attribute;
+ Qt3DCore::QAttribute attribute;
// THEN
- QCOMPARE(Qt3DRender::QAttribute::defaultPositionAttributeName(), QStringLiteral("vertexPosition"));
- QCOMPARE(Qt3DRender::QAttribute::defaultNormalAttributeName(), QStringLiteral("vertexNormal"));
- QCOMPARE(Qt3DRender::QAttribute::defaultColorAttributeName(), QStringLiteral("vertexColor"));
- QCOMPARE(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName(), QStringLiteral("vertexTexCoord"));
- QCOMPARE(Qt3DRender::QAttribute::defaultTangentAttributeName(), QStringLiteral("vertexTangent"));
- QCOMPARE(Qt3DRender::QAttribute::defaultJointIndicesAttributeName(), QStringLiteral("vertexJointIndices"));
- QCOMPARE(Qt3DRender::QAttribute::defaultJointWeightsAttributeName(), QStringLiteral("vertexJointWeights"));
+ QCOMPARE(Qt3DCore::QAttribute::defaultPositionAttributeName(), QStringLiteral("vertexPosition"));
+ QCOMPARE(Qt3DCore::QAttribute::defaultNormalAttributeName(), QStringLiteral("vertexNormal"));
+ QCOMPARE(Qt3DCore::QAttribute::defaultColorAttributeName(), QStringLiteral("vertexColor"));
+ QCOMPARE(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName(), QStringLiteral("vertexTexCoord"));
+ QCOMPARE(Qt3DCore::QAttribute::defaultTangentAttributeName(), QStringLiteral("vertexTangent"));
+ QCOMPARE(Qt3DCore::QAttribute::defaultJointIndicesAttributeName(), QStringLiteral("vertexJointIndices"));
+ QCOMPARE(Qt3DCore::QAttribute::defaultJointWeightsAttributeName(), QStringLiteral("vertexJointWeights"));
QCOMPARE(attribute.property("defaultPositionAttributeName").toString(),
- Qt3DRender::QAttribute::defaultPositionAttributeName());
+ Qt3DCore::QAttribute::defaultPositionAttributeName());
QCOMPARE(attribute.property("defaultNormalAttributeName").toString(),
- Qt3DRender::QAttribute::defaultNormalAttributeName());
+ Qt3DCore::QAttribute::defaultNormalAttributeName());
QCOMPARE(attribute.property("defaultColorAttributeName").toString(),
- Qt3DRender::QAttribute::defaultColorAttributeName());
+ Qt3DCore::QAttribute::defaultColorAttributeName());
QCOMPARE(attribute.property("defaultTextureCoordinateAttributeName").toString(),
- Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
+ Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
QCOMPARE(attribute.property("defaultTangentAttributeName").toString(),
- Qt3DRender::QAttribute::defaultTangentAttributeName());
+ Qt3DCore::QAttribute::defaultTangentAttributeName());
QCOMPARE(attribute.property("defaultJointIndicesAttributeName").toString(),
- Qt3DRender::QAttribute::defaultJointIndicesAttributeName());
+ Qt3DCore::QAttribute::defaultJointIndicesAttributeName());
QCOMPARE(attribute.property("defaultJointWeightsAttributeName").toString(),
- Qt3DRender::QAttribute::defaultJointWeightsAttributeName());
+ Qt3DCore::QAttribute::defaultJointWeightsAttributeName());
}
void checkPropertyUpdates()
{
// GIVEN
TestArbiter arbiter;
- QScopedPointer<Qt3DRender::QAttribute> attribute(new Qt3DRender::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> attribute(new Qt3DCore::QAttribute());
arbiter.setArbiterOnNode(attribute.data());
// WHEN
- attribute->setVertexBaseType(Qt3DRender::QAttribute::Double);
+ attribute->setVertexBaseType(Qt3DCore::QAttribute::Double);
// THEN
QCOMPARE(arbiter.dirtyNodes().size(), 1);
@@ -147,7 +147,7 @@ private Q_SLOTS:
arbiter.clear();
// WHEN
- attribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ attribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
// THEN
QCOMPARE(arbiter.dirtyNodes().size(), 1);
@@ -156,7 +156,7 @@ private Q_SLOTS:
arbiter.clear();
// WHEN
- Qt3DRender::QBuffer buf;
+ Qt3DCore::QBuffer buf;
attribute->setBuffer(&buf);
// THEN
@@ -166,7 +166,7 @@ private Q_SLOTS:
arbiter.clear();
// WHEN
- Qt3DRender::QBuffer buf2;
+ Qt3DCore::QBuffer buf2;
attribute->setBuffer(&buf2);
// THEN
@@ -179,10 +179,10 @@ private Q_SLOTS:
void checkBufferBookkeeping()
{
// GIVEN
- QScopedPointer<Qt3DRender::QAttribute> attribute(new Qt3DRender::QAttribute);
+ QScopedPointer<Qt3DCore::QAttribute> attribute(new Qt3DCore::QAttribute);
{
// WHEN
- Qt3DRender::QBuffer buf;
+ Qt3DCore::QBuffer buf;
attribute->setBuffer(&buf);
// THEN
@@ -194,8 +194,8 @@ private Q_SLOTS:
{
// WHEN
- Qt3DRender::QAttribute someOtherAttribute;
- QScopedPointer<Qt3DRender::QBuffer> buf(new Qt3DRender::QBuffer(&someOtherAttribute));
+ Qt3DCore::QAttribute someOtherAttribute;
+ QScopedPointer<Qt3DCore::QBuffer> buf(new Qt3DCore::QBuffer(&someOtherAttribute));
attribute->setBuffer(buf.data());
// THEN
diff --git a/tests/auto/render/qbuffer/tst_qbuffer.cpp b/tests/auto/render/qbuffer/tst_qbuffer.cpp
index 34cfe4941..d5c5f1b3a 100644
--- a/tests/auto/render/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/render/qbuffer/tst_qbuffer.cpp
@@ -26,16 +26,12 @@
**
****************************************************************************/
-// TODO Remove in Qt6
-#include <QtCore/qcompilerdetection.h>
-QT_WARNING_DISABLE_DEPRECATED
-
#include <QtTest/QTest>
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qscene_p.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/private/qbuffer_p.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/private/qbuffer_p.h>
#include "testarbiter.h"
@@ -49,11 +45,11 @@ private Q_SLOTS:
{
// GIVEN
TestArbiter arbiter;
- QScopedPointer<Qt3DRender::QBuffer> buffer(new Qt3DRender::QBuffer);
+ QScopedPointer<Qt3DCore::QBuffer> buffer(new Qt3DCore::QBuffer);
arbiter.setArbiterOnNode(buffer.data());
// WHEN
- buffer->setUsage(Qt3DRender::QBuffer::DynamicCopy);
+ buffer->setUsage(Qt3DCore::QBuffer::DynamicCopy);
// THEN
QCOMPARE(arbiter.dirtyNodes().size(), 1);
diff --git a/tests/auto/render/qgeometry/tst_qgeometry.cpp b/tests/auto/render/qgeometry/tst_qgeometry.cpp
index 30092b204..59684567b 100644
--- a/tests/auto/render/qgeometry/tst_qgeometry.cpp
+++ b/tests/auto/render/qgeometry/tst_qgeometry.cpp
@@ -30,16 +30,16 @@
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qscene_p.h>
-#include <Qt3DRender/qgeometry.h>
-#include <Qt3DRender/private/qgeometry_p.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
+#include <Qt3DCore/private/qgeometry_p.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <QSignalSpy>
#include "testarbiter.h"
-class FakeGeometry : public Qt3DRender::QGeometry
+class FakeGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
};
@@ -54,11 +54,11 @@ private Q_SLOTS:
{
// GIVEN
TestArbiter arbiter;
- QScopedPointer<Qt3DRender::QGeometry> geometry(new Qt3DRender::QGeometry());
+ QScopedPointer<Qt3DCore::QGeometry> geometry(new Qt3DCore::QGeometry());
arbiter.setArbiterOnNode(geometry.data());
// WHEN
- Qt3DRender::QAttribute attr;
+ Qt3DCore::QAttribute attr;
geometry->addAttribute(&attr);
QCoreApplication::processEvents();
@@ -87,10 +87,10 @@ private Q_SLOTS:
void checkAttributeBookkeeping()
{
// GIVEN
- QScopedPointer<Qt3DRender::QGeometry> geometry(new Qt3DRender::QGeometry);
+ QScopedPointer<Qt3DCore::QGeometry> geometry(new Qt3DCore::QGeometry);
{
// WHEN
- Qt3DRender::QAttribute attribute;
+ Qt3DCore::QAttribute attribute;
geometry->addAttribute(&attribute);
// THEN
@@ -102,8 +102,8 @@ private Q_SLOTS:
{
// WHEN
- Qt3DRender::QGeometry someOtherGeometry;
- QScopedPointer<Qt3DRender::QAttribute> attribute(new Qt3DRender::QAttribute(&someOtherGeometry));
+ Qt3DCore::QGeometry someOtherGeometry;
+ QScopedPointer<Qt3DCore::QAttribute> attribute(new Qt3DCore::QAttribute(&someOtherGeometry));
geometry->addAttribute(attribute.data());
// THEN
@@ -134,7 +134,7 @@ private Q_SLOTS:
QCOMPARE(geometry->maxExtent(), QVector3D());
// WHEN
- auto dNode = static_cast<Qt3DRender::QGeometryPrivate *>(Qt3DCore::QNodePrivate::get(geometry.data()));
+ auto dNode = static_cast<Qt3DCore::QGeometryPrivate *>(Qt3DCore::QNodePrivate::get(geometry.data()));
const QVector3D minExt(-1.0f, -1.0f, -1.0f);
const QVector3D maxExt(1.0f, 1.0f, 1.0f);
dNode->setExtent(minExt, maxExt);
diff --git a/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp b/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
index 76f913af7..f3560e353 100644
--- a/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
+++ b/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
@@ -26,18 +26,14 @@
**
****************************************************************************/
-// TODO Remove in Qt6
-#include <QtCore/qcompilerdetection.h>
-QT_WARNING_DISABLE_DEPRECATED
-
#include <QtTest/QTest>
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qscene_p.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qgeometry.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
#include <Qt3DRender/private/qgeometryrenderer_p.h>
#include "testarbiter.h"
@@ -146,7 +142,7 @@ private Q_SLOTS:
arbiter.clear();
// WHEN
- Qt3DRender::QGeometry geom;
+ Qt3DCore::QGeometry geom;
geometryRenderer->setGeometry(&geom);
QCoreApplication::processEvents();
@@ -157,7 +153,7 @@ private Q_SLOTS:
arbiter.clear();
// WHEN
- Qt3DRender::QGeometry geom2;
+ Qt3DCore::QGeometry geom2;
geometryRenderer->setGeometry(&geom2);
QCoreApplication::processEvents();
@@ -174,7 +170,7 @@ private Q_SLOTS:
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer);
{
// WHEN
- Qt3DRender::QGeometry geometry;
+ Qt3DCore::QGeometry geometry;
geometryRenderer->setGeometry(&geometry);
// THEN
@@ -187,7 +183,7 @@ private Q_SLOTS:
{
// WHEN
Qt3DRender::QGeometryRenderer someOtherGeometryRenderer;
- QScopedPointer<Qt3DRender::QGeometry> geometry(new Qt3DRender::QGeometry(&someOtherGeometryRenderer));
+ QScopedPointer<Qt3DCore::QGeometry> geometry(new Qt3DCore::QGeometry(&someOtherGeometryRenderer));
geometryRenderer->setGeometry(geometry.data());
// THEN
diff --git a/tests/auto/render/scene2d/tst_scene2d.cpp b/tests/auto/render/scene2d/tst_scene2d.cpp
index 4b4ba03f0..bf9e70879 100644
--- a/tests/auto/render/scene2d/tst_scene2d.cpp
+++ b/tests/auto/render/scene2d/tst_scene2d.cpp
@@ -31,7 +31,7 @@
#include <private/qscene2d_p.h>
#include <private/scene2d_p.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qbuffer.h>
#include <private/trianglesvisitor_p.h>
#include <private/nodemanagers_p.h>
#include <private/managers_p.h>
@@ -211,11 +211,11 @@ private Q_SLOTS:
TestRenderer renderer;
QScopedPointer<Scene2D> scene2d(new Scene2D());
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
Qt3DRender::QGeometryRenderer *geometryRenderer = new Qt3DRender::QGeometryRenderer();
- Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute();
- Qt3DRender::QAttribute *texcoordAttribute = new Qt3DRender::QAttribute();
- Qt3DRender::QBuffer *dataBuffer =new Qt3DRender::QBuffer();
+ Qt3DCore::QAttribute *positionAttribute = new Qt3DCore::QAttribute();
+ Qt3DCore::QAttribute *texcoordAttribute = new Qt3DCore::QAttribute();
+ Qt3DCore::QBuffer *dataBuffer =new Qt3DCore::QBuffer();
QScopedPointer<Qt3DCore::QEntity> entity(new Qt3DCore::QEntity());
entity->addComponent(geometryRenderer);
renderer.setNodeManagers(nodeManagers.data());
@@ -272,23 +272,23 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer, backendBuffer);
positionAttribute->setBuffer(dataBuffer);
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(sizeof(float) * 5);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute);
texcoordAttribute->setBuffer(dataBuffer);
- texcoordAttribute->setName(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName());
- texcoordAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ texcoordAttribute->setName(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName());
+ texcoordAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
texcoordAttribute->setVertexSize(2);
texcoordAttribute->setCount(6);
texcoordAttribute->setByteStride(sizeof(float) * 5);
texcoordAttribute->setByteOffset(sizeof(float) * 3);
- texcoordAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ texcoordAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(texcoordAttribute);
geometryRenderer->setGeometry(geometry);
diff --git a/tests/auto/render/segmentvisitor/tst_segmentvisitor.cpp b/tests/auto/render/segmentvisitor/tst_segmentvisitor.cpp
index fc65d0854..7283f7a0a 100644
--- a/tests/auto/render/segmentvisitor/tst_segmentvisitor.cpp
+++ b/tests/auto/render/segmentvisitor/tst_segmentvisitor.cpp
@@ -29,7 +29,7 @@
#include <QtTest/QTest>
#include <qbackendnodetester.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qbuffer.h>
#include <private/segmentsvisitor_p.h>
#include <private/nodemanagers_p.h>
#include <private/managers_p.h>
@@ -150,10 +150,10 @@ private Q_SLOTS:
void testVisitSegments()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -188,13 +188,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -226,12 +226,12 @@ private Q_SLOTS:
void testVisitSegmentsIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -277,18 +277,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(4);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(2*5);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
@@ -328,10 +328,10 @@ private Q_SLOTS:
void testVisitLineStrip()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -357,13 +357,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(4);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -395,12 +395,12 @@ private Q_SLOTS:
void testVisitListStripIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -443,18 +443,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(4);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(7);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
@@ -495,10 +495,10 @@ private Q_SLOTS:
void testVisitLineLoop()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -524,13 +524,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(4);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -563,12 +563,12 @@ private Q_SLOTS:
void testVisitLineLoopIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -612,18 +612,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(4);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(8);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
@@ -667,10 +667,10 @@ private Q_SLOTS:
void testVisitLineAdjacency()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -697,13 +697,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(4);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -733,12 +733,12 @@ private Q_SLOTS:
void testVisitLinesAdjacencyIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -779,18 +779,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(4);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(4);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
diff --git a/tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp b/tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp
index 66f67e08a..058df8887 100644
--- a/tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp
+++ b/tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp
@@ -29,7 +29,7 @@
#include <QtTest/QTest>
#include <qbackendnodetester.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qbuffer.h>
+#include <Qt3DCore/qbuffer.h>
#include <private/trianglesvisitor_p.h>
#include <private/nodemanagers_p.h>
#include <private/managers_p.h>
@@ -154,10 +154,10 @@ private Q_SLOTS:
void testVisitTriangles()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -190,13 +190,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(0);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -227,12 +227,12 @@ private Q_SLOTS:
void testVisitTrianglesIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -290,18 +290,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(3*5);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
@@ -341,10 +341,10 @@ private Q_SLOTS:
void testVisitTriangleStrip()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -377,13 +377,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -416,12 +416,12 @@ private Q_SLOTS:
void testVisitTriangleStripIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -480,18 +480,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(4*4);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
@@ -537,10 +537,10 @@ private Q_SLOTS:
void testVisitTriangleFan()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -573,13 +573,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -612,12 +612,12 @@ private Q_SLOTS:
void testVisitTriangleFanIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -670,18 +670,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(10);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
@@ -723,10 +723,10 @@ private Q_SLOTS:
void testVisitTrianglesAdjacency()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -759,13 +759,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -795,12 +795,12 @@ private Q_SLOTS:
void testVisitTrianglesAdjacencyIndexed()
{
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -856,18 +856,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(3*4);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
@@ -905,10 +905,10 @@ private Q_SLOTS:
{
QSKIP("TriangleStripAdjacency not implemented");
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -953,13 +953,13 @@ private Q_SLOTS:
simulateInitializationSync(dataBuffer.data(), backendBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(8);
positionAttribute->setByteStride(3*4);
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
geometry->addAttribute(positionAttribute.data());
geometryRenderer->setGeometry(geometry);
@@ -991,12 +991,12 @@ private Q_SLOTS:
{
QSKIP("TriangleStripAdjacency not implemented");
QScopedPointer<NodeManagers> nodeManagers(new NodeManagers());
- Qt3DRender::QGeometry *geometry = new Qt3DRender::QGeometry();
+ Qt3DCore::QGeometry *geometry = new Qt3DCore::QGeometry();
QScopedPointer<Qt3DRender::QGeometryRenderer> geometryRenderer(new Qt3DRender::QGeometryRenderer());
- QScopedPointer<Qt3DRender::QAttribute> positionAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QAttribute> indexAttribute(new Qt3DRender::QAttribute());
- QScopedPointer<Qt3DRender::QBuffer> dataBuffer(new Qt3DRender::QBuffer());
- QScopedPointer<Qt3DRender::QBuffer> indexDataBuffer(new Qt3DRender::QBuffer());
+ QScopedPointer<Qt3DCore::QAttribute> positionAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QAttribute> indexAttribute(new Qt3DCore::QAttribute());
+ QScopedPointer<Qt3DCore::QBuffer> dataBuffer(new Qt3DCore::QBuffer());
+ QScopedPointer<Qt3DCore::QBuffer> indexDataBuffer(new Qt3DCore::QBuffer());
TestVisitor visitor(nodeManagers.data());
TestRenderer renderer;
@@ -1047,18 +1047,18 @@ private Q_SLOTS:
simulateInitializationSync(indexDataBuffer.data(), backendIndexBuffer);
positionAttribute->setBuffer(dataBuffer.data());
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setCount(6);
positionAttribute->setByteStride(3*sizeof(float));
positionAttribute->setByteOffset(0);
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
indexAttribute->setBuffer(indexDataBuffer.data());
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedInt);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedInt);
indexAttribute->setCount(8);
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
geometry->addAttribute(positionAttribute.data());
geometry->addAttribute(indexAttribute.data());
diff --git a/tests/auto/render/updatemeshtrianglelistjob/tst_updatemeshtrianglelistjob.cpp b/tests/auto/render/updatemeshtrianglelistjob/tst_updatemeshtrianglelistjob.cpp
index ae2218739..a0af5cea5 100644
--- a/tests/auto/render/updatemeshtrianglelistjob/tst_updatemeshtrianglelistjob.cpp
+++ b/tests/auto/render/updatemeshtrianglelistjob/tst_updatemeshtrianglelistjob.cpp
@@ -146,8 +146,8 @@ struct NodeCollection
{
explicit NodeCollection(Qt3DRender::TestAspect *aspect, QObject *frontendRoot)
: geometryRenderers(frontendRoot->findChildren<Qt3DRender::QGeometryRenderer *>())
- , attributes(frontendRoot->findChildren<Qt3DRender::QAttribute *>())
- , buffers(frontendRoot->findChildren<Qt3DRender::QBuffer *>())
+ , attributes(frontendRoot->findChildren<Qt3DCore::QAttribute *>())
+ , buffers(frontendRoot->findChildren<Qt3DCore::QBuffer *>())
{
// THEN
QCOMPARE(aspect->nodeManagers()->geometryManager()->activeHandles().size(), geometryRenderers.size());
@@ -160,13 +160,13 @@ struct NodeCollection
backendGeometryRenderer.push_back(backend);
}
- for (const Qt3DRender::QAttribute *a : qAsConst(attributes)) {
+ for (const Qt3DCore::QAttribute *a : qAsConst(attributes)) {
Qt3DRender::Render::Attribute *backend = aspect->nodeManagers()->attributeManager()->lookupResource(a->id());
QVERIFY(backend != nullptr);
backendAttributes.push_back(backend);
}
- for (const Qt3DRender::QBuffer *b : qAsConst(buffers)) {
+ for (const Qt3DCore::QBuffer *b : qAsConst(buffers)) {
Qt3DRender::Render::Buffer *backend = aspect->nodeManagers()->bufferManager()->lookupResource(b->id());
QVERIFY(backend != nullptr);
backendBuffers.push_back(backend);
@@ -174,8 +174,8 @@ struct NodeCollection
}
QList<Qt3DRender::QGeometryRenderer *> geometryRenderers;
- QList<Qt3DRender::QAttribute *> attributes;
- QList<Qt3DRender::QBuffer *> buffers;
+ QList<Qt3DCore::QAttribute *> attributes;
+ QList<Qt3DCore::QBuffer *> buffers;
QVector<Qt3DRender::Render::GeometryRenderer *> backendGeometryRenderer;
QVector<Qt3DRender::Render::Attribute *> backendAttributes;
diff --git a/tests/manual/buffercapture-qml/main.cpp b/tests/manual/buffercapture-qml/main.cpp
index 6928c5724..278646a3c 100644
--- a/tests/manual/buffercapture-qml/main.cpp
+++ b/tests/manual/buffercapture-qml/main.cpp
@@ -67,9 +67,9 @@ int main(int argc, char* argv[])
view.setSource(QUrl("qrc:/main.qml"));
QObject *rootObject = view.rootObject();
- Qt3DRender::QBuffer *buffer = rootObject->findChild<Qt3DRender::QBuffer*>("buffer");
+ Qt3DCore::QBuffer *buffer = rootObject->findChild<Qt3DCore::QBuffer*>("buffer");
- QObject::connect(buffer, &Qt3DRender::QBuffer::dataChanged,
+ QObject::connect(buffer, &Qt3DCore::QBuffer::dataChanged,
[=](const QByteArray &bytes) {
//I know I'm receiving int data
const uint *data = reinterpret_cast<const uint*>(bytes.data());
diff --git a/tests/manual/custom-mesh-cpp-indirect/main.cpp b/tests/manual/custom-mesh-cpp-indirect/main.cpp
index 3e26e3d10..0cb19f8b2 100644
--- a/tests/manual/custom-mesh-cpp-indirect/main.cpp
+++ b/tests/manual/custom-mesh-cpp-indirect/main.cpp
@@ -55,6 +55,9 @@
#include <Qt3DRender/QCameraLens>
#include <Qt3DCore/QTransform>
#include <Qt3DCore/QAspectEngine>
+#include <Qt3DCore/QGeometry>
+#include <Qt3DCore/QAttribute>
+#include <Qt3DCore/QBuffer>
#include <Qt3DInput/QInputAspect>
@@ -64,9 +67,6 @@
#include <Qt3DExtras/QPerVertexColorMaterial>
#include <Qt3DRender/QGeometryRenderer>
-#include <Qt3DRender/QGeometry>
-#include <Qt3DRender/QAttribute>
-#include <Qt3DRender/QBuffer>
#include <QPropertyAnimation>
#include <Qt3DExtras/qt3dwindow.h>
@@ -166,11 +166,11 @@ int main(int argc, char* argv[])
// Custom Mesh (TetraHedron)
Qt3DRender::QGeometryRenderer *customMeshRenderer = new Qt3DRender::QGeometryRenderer;
- Qt3DRender::QGeometry *customGeometry = new Qt3DRender::QGeometry(customMeshRenderer);
+ Qt3DCore::QGeometry *customGeometry = new Qt3DCore::QGeometry(customMeshRenderer);
- Qt3DRender::QBuffer *vertexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
- Qt3DRender::QBuffer *indexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
- Qt3DRender::QBuffer *indirectDrawDataBuffer = new Qt3DRender::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *vertexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *indexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *indirectDrawDataBuffer = new Qt3DCore::QBuffer(customGeometry);
// 4 distinct vertices
QByteArray vertexBufferData;
@@ -222,47 +222,47 @@ int main(int argc, char* argv[])
indirectDrawDataBuffer->setData(indirectBufferData);
// Attributes
- Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute();
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *positionAttribute = new Qt3DCore::QAttribute();
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
positionAttribute->setBuffer(vertexDataBuffer);
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setByteOffset(0);
positionAttribute->setByteStride(9 * sizeof(float));
positionAttribute->setCount(4);
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
- Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute();
- normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *normalAttribute = new Qt3DCore::QAttribute();
+ normalAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
normalAttribute->setBuffer(vertexDataBuffer);
- normalAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ normalAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
normalAttribute->setVertexSize(3);
normalAttribute->setByteOffset(3 * sizeof(float));
normalAttribute->setByteStride(9 * sizeof(float));
normalAttribute->setCount(4);
- normalAttribute->setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
+ normalAttribute->setName(Qt3DCore::QAttribute::defaultNormalAttributeName());
- Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute();
- colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *colorAttribute = new Qt3DCore::QAttribute();
+ colorAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
colorAttribute->setBuffer(vertexDataBuffer);
- colorAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ colorAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
colorAttribute->setVertexSize(3);
colorAttribute->setByteOffset(6 * sizeof(float));
colorAttribute->setByteStride(9 * sizeof(float));
colorAttribute->setCount(4);
- colorAttribute->setName(Qt3DRender::QAttribute::defaultColorAttributeName());
+ colorAttribute->setName(Qt3DCore::QAttribute::defaultColorAttributeName());
- Qt3DRender::QAttribute *indexAttribute = new Qt3DRender::QAttribute();
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ Qt3DCore::QAttribute *indexAttribute = new Qt3DCore::QAttribute();
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
indexAttribute->setBuffer(indexDataBuffer);
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
indexAttribute->setVertexSize(1);
indexAttribute->setByteOffset(0);
indexAttribute->setByteStride(0);
indexAttribute->setCount(12);
- Qt3DRender::QAttribute *indirectAttribute = new Qt3DRender::QAttribute();
- indirectAttribute->setAttributeType(Qt3DRender::QAttribute::DrawIndirectAttribute);
+ Qt3DCore::QAttribute *indirectAttribute = new Qt3DCore::QAttribute();
+ indirectAttribute->setAttributeType(Qt3DCore::QAttribute::DrawIndirectAttribute);
indirectAttribute->setBuffer(indirectDrawDataBuffer);
indirectAttribute->setByteOffset(0);
indirectAttribute->setByteStride(0);
@@ -298,10 +298,10 @@ int main(int argc, char* argv[])
// Custom Mesh (TetraHedron)
Qt3DRender::QGeometryRenderer *customMeshRenderer = new Qt3DRender::QGeometryRenderer;
- Qt3DRender::QGeometry *customGeometry = new Qt3DRender::QGeometry(customMeshRenderer);
+ Qt3DCore::QGeometry *customGeometry = new Qt3DCore::QGeometry(customMeshRenderer);
- Qt3DRender::QBuffer *vertexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
- Qt3DRender::QBuffer *indirectDrawDataBuffer = new Qt3DRender::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *vertexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *indirectDrawDataBuffer = new Qt3DCore::QBuffer(customGeometry);
QVector<QVector3D> orderedPositionVertices;
@@ -340,38 +340,38 @@ int main(int argc, char* argv[])
indirectDrawDataBuffer->setData(indirectBufferData);
// Attributes
- Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute();
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *positionAttribute = new Qt3DCore::QAttribute();
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
positionAttribute->setBuffer(vertexDataBuffer);
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setByteOffset(0);
positionAttribute->setByteStride(9 * sizeof(float));
positionAttribute->setCount(12);
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
- Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute();
- normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *normalAttribute = new Qt3DCore::QAttribute();
+ normalAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
normalAttribute->setBuffer(vertexDataBuffer);
- normalAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ normalAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
normalAttribute->setVertexSize(3);
normalAttribute->setByteOffset(3 * sizeof(float));
normalAttribute->setByteStride(9 * sizeof(float));
normalAttribute->setCount(12);
- normalAttribute->setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
+ normalAttribute->setName(Qt3DCore::QAttribute::defaultNormalAttributeName());
- Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute();
- colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *colorAttribute = new Qt3DCore::QAttribute();
+ colorAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
colorAttribute->setBuffer(vertexDataBuffer);
- colorAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ colorAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
colorAttribute->setVertexSize(3);
colorAttribute->setByteOffset(6 * sizeof(float));
colorAttribute->setByteStride(9 * sizeof(float));
colorAttribute->setCount(12);
- colorAttribute->setName(Qt3DRender::QAttribute::defaultColorAttributeName());
+ colorAttribute->setName(Qt3DCore::QAttribute::defaultColorAttributeName());
- Qt3DRender::QAttribute *indirectAttribute = new Qt3DRender::QAttribute();
- indirectAttribute->setAttributeType(Qt3DRender::QAttribute::DrawIndirectAttribute);
+ Qt3DCore::QAttribute *indirectAttribute = new Qt3DCore::QAttribute();
+ indirectAttribute->setAttributeType(Qt3DCore::QAttribute::DrawIndirectAttribute);
indirectAttribute->setBuffer(indirectDrawDataBuffer);
indirectAttribute->setByteOffset(0);
indirectAttribute->setByteStride(0);
diff --git a/tests/manual/custom-mesh-cpp/main.cpp b/tests/manual/custom-mesh-cpp/main.cpp
index 275d97088..dee8363d8 100644
--- a/tests/manual/custom-mesh-cpp/main.cpp
+++ b/tests/manual/custom-mesh-cpp/main.cpp
@@ -55,6 +55,9 @@
#include <Qt3DRender/QCameraLens>
#include <Qt3DCore/QTransform>
#include <Qt3DCore/QAspectEngine>
+#include <Qt3DCore/QGeometry>
+#include <Qt3DCore/QAttribute>
+#include <Qt3DCore/QBuffer>
#include <Qt3DInput/QInputAspect>
@@ -64,9 +67,6 @@
#include <Qt3DExtras/QPerVertexColorMaterial>
#include <Qt3DRender/QGeometryRenderer>
-#include <Qt3DRender/QGeometry>
-#include <Qt3DRender/QAttribute>
-#include <Qt3DRender/QBuffer>
#include <QPropertyAnimation>
#include <Qt3DExtras/qt3dwindow.h>
@@ -105,10 +105,10 @@ int main(int argc, char* argv[])
// Custom Mesh (TetraHedron)
Qt3DRender::QGeometryRenderer *customMeshRenderer = new Qt3DRender::QGeometryRenderer;
- Qt3DRender::QGeometry *customGeometry = new Qt3DRender::QGeometry(customMeshRenderer);
+ Qt3DCore::QGeometry *customGeometry = new Qt3DCore::QGeometry(customMeshRenderer);
- Qt3DRender::QBuffer *vertexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
- Qt3DRender::QBuffer *indexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *vertexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *indexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
// vec3 for position
// vec3 for colors
@@ -190,40 +190,40 @@ int main(int argc, char* argv[])
indexDataBuffer->setData(indexBufferData);
// Attributes
- Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute();
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *positionAttribute = new Qt3DCore::QAttribute();
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
positionAttribute->setBuffer(vertexDataBuffer);
- positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
positionAttribute->setVertexSize(3);
positionAttribute->setByteOffset(0);
positionAttribute->setByteStride(9 * sizeof(float));
positionAttribute->setCount(4);
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
- Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute();
- normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *normalAttribute = new Qt3DCore::QAttribute();
+ normalAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
normalAttribute->setBuffer(vertexDataBuffer);
- normalAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ normalAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
normalAttribute->setVertexSize(3);
normalAttribute->setByteOffset(3 * sizeof(float));
normalAttribute->setByteStride(9 * sizeof(float));
normalAttribute->setCount(4);
- normalAttribute->setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
+ normalAttribute->setName(Qt3DCore::QAttribute::defaultNormalAttributeName());
- Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute();
- colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *colorAttribute = new Qt3DCore::QAttribute();
+ colorAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
colorAttribute->setBuffer(vertexDataBuffer);
- colorAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ colorAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
colorAttribute->setVertexSize(3);
colorAttribute->setByteOffset(6 * sizeof(float));
colorAttribute->setByteStride(9 * sizeof(float));
colorAttribute->setCount(4);
- colorAttribute->setName(Qt3DRender::QAttribute::defaultColorAttributeName());
+ colorAttribute->setName(Qt3DCore::QAttribute::defaultColorAttributeName());
- Qt3DRender::QAttribute *indexAttribute = new Qt3DRender::QAttribute();
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ Qt3DCore::QAttribute *indexAttribute = new Qt3DCore::QAttribute();
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
indexAttribute->setBuffer(indexDataBuffer);
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
indexAttribute->setVertexSize(1);
indexAttribute->setByteOffset(0);
indexAttribute->setByteStride(0);
diff --git a/tests/manual/custom-mesh-update-data-cpp/main.cpp b/tests/manual/custom-mesh-update-data-cpp/main.cpp
index 2b6b6b3cf..9f997658b 100644
--- a/tests/manual/custom-mesh-update-data-cpp/main.cpp
+++ b/tests/manual/custom-mesh-update-data-cpp/main.cpp
@@ -56,6 +56,9 @@
#include <Qt3DRender/QCameraLens>
#include <Qt3DCore/QTransform>
#include <Qt3DCore/QAspectEngine>
+#include <Qt3DCore/QGeometry>
+#include <Qt3DCore/QAttribute>
+#include <Qt3DCore/QBuffer>
#include <Qt3DInput/QInputAspect>
@@ -65,9 +68,6 @@
#include <Qt3DExtras/QPerVertexColorMaterial>
#include <Qt3DRender/QGeometryRenderer>
-#include <Qt3DRender/QGeometry>
-#include <Qt3DRender/QAttribute>
-#include <Qt3DRender/QBuffer>
#include <QPropertyAnimation>
#include <Qt3DExtras/qt3dwindow.h>
@@ -75,7 +75,7 @@
#include <qmath.h>
QByteArray vertexBufferData;
-Qt3DRender::QBuffer *vertexDataBuffer;
+Qt3DCore::QBuffer *vertexDataBuffer;
class TimerObject: public QObject {
Q_OBJECT
@@ -124,10 +124,10 @@ int main(int argc, char* argv[])
// Custom Mesh (TetraHedron)
Qt3DRender::QGeometryRenderer *customMeshRenderer = new Qt3DRender::QGeometryRenderer;
- Qt3DRender::QGeometry *customGeometry = new Qt3DRender::QGeometry(customMeshRenderer);
+ Qt3DCore::QGeometry *customGeometry = new Qt3DCore::QGeometry(customMeshRenderer);
- vertexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
- Qt3DRender::QBuffer *indexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
+ vertexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *indexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
// vec3 for position
// vec3 for colors
@@ -208,37 +208,37 @@ int main(int argc, char* argv[])
indexDataBuffer->setData(indexBufferData);
// Attributes
- Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute();
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *positionAttribute = new Qt3DCore::QAttribute();
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
positionAttribute->setBuffer(vertexDataBuffer);
positionAttribute->setVertexSize(3);
positionAttribute->setByteOffset(0);
positionAttribute->setByteStride(9 * sizeof(float));
positionAttribute->setCount(4);
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
- Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute();
- normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *normalAttribute = new Qt3DCore::QAttribute();
+ normalAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
normalAttribute->setBuffer(vertexDataBuffer);
normalAttribute->setVertexSize(3);
normalAttribute->setByteOffset(3 * sizeof(float));
normalAttribute->setByteStride(9 * sizeof(float));
normalAttribute->setCount(4);
- normalAttribute->setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
+ normalAttribute->setName(Qt3DCore::QAttribute::defaultNormalAttributeName());
- Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute();
- colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *colorAttribute = new Qt3DCore::QAttribute();
+ colorAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
colorAttribute->setBuffer(vertexDataBuffer);
colorAttribute->setVertexSize(3);
colorAttribute->setByteOffset(6 * sizeof(float));
colorAttribute->setByteStride(9 * sizeof(float));
colorAttribute->setCount(4);
- colorAttribute->setName(Qt3DRender::QAttribute::defaultColorAttributeName());
+ colorAttribute->setName(Qt3DCore::QAttribute::defaultColorAttributeName());
- Qt3DRender::QAttribute *indexAttribute = new Qt3DRender::QAttribute();
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ Qt3DCore::QAttribute *indexAttribute = new Qt3DCore::QAttribute();
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
indexAttribute->setBuffer(indexDataBuffer);
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
indexAttribute->setVertexSize(1);
indexAttribute->setByteOffset(0);
indexAttribute->setByteStride(0);
diff --git a/tests/manual/mesh-morphing/main.cpp b/tests/manual/mesh-morphing/main.cpp
index 641722a4c..a2c9dfc17 100644
--- a/tests/manual/mesh-morphing/main.cpp
+++ b/tests/manual/mesh-morphing/main.cpp
@@ -108,8 +108,8 @@ int main(int argc, char **argv)
cylinder3->setRadius(1.0f);
QStringList attributes;
- attributes.push_back(Qt3DRender::QAttribute::defaultPositionAttributeName());
- attributes.push_back(Qt3DRender::QAttribute::defaultNormalAttributeName());
+ attributes.push_back(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ attributes.push_back(Qt3DCore::QAttribute::defaultNormalAttributeName());
QVector<Qt3DAnimation::QMorphTarget*> morphTargets;
morphTargets.push_back(Qt3DAnimation::QMorphTarget::fromGeometry(cylinder1, attributes));
diff --git a/tests/manual/tessellation-modes/tessellatedquadmesh.cpp b/tests/manual/tessellation-modes/tessellatedquadmesh.cpp
index 8e9a09d98..f5980f056 100644
--- a/tests/manual/tessellation-modes/tessellatedquadmesh.cpp
+++ b/tests/manual/tessellation-modes/tessellatedquadmesh.cpp
@@ -50,18 +50,18 @@
#include "tessellatedquadmesh.h"
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qgeometry.h>
+#include <Qt3DCore/qattribute.h>
+#include <Qt3DCore/qbuffer.h>
+#include <Qt3DCore/qgeometry.h>
-class TessellatedGeometry : public Qt3DRender::QGeometry
+class TessellatedGeometry : public Qt3DCore::QGeometry
{
Q_OBJECT
public:
TessellatedGeometry(Qt3DCore::QNode *parent = nullptr)
- : Qt3DRender::QGeometry(parent)
- , m_positionAttribute(new Qt3DRender::QAttribute(this))
- , m_vertexBuffer(new Qt3DRender::QBuffer(this))
+ : Qt3DCore::QGeometry(parent)
+ , m_positionAttribute(new Qt3DCore::QAttribute(this))
+ , m_vertexBuffer(new Qt3DCore::QBuffer(this))
{
const float positionData[] = {
-0.8f, -0.8f, 0.0f,
@@ -78,8 +78,8 @@ public:
m_vertexBuffer->setData(positionBytes);
- m_positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
- m_positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float);
+ m_positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
+ m_positionAttribute->setVertexBaseType(Qt3DCore::QAttribute::Float);
m_positionAttribute->setVertexSize(3);
m_positionAttribute->setCount(nVerts);
m_positionAttribute->setByteStride(3 * sizeof(float));
@@ -89,8 +89,8 @@ public:
}
private:
- Qt3DRender::QAttribute *m_positionAttribute;
- Qt3DRender::QBuffer *m_vertexBuffer;
+ Qt3DCore::QAttribute *m_positionAttribute;
+ Qt3DCore::QBuffer *m_vertexBuffer;
};
TessellatedQuadMesh::TessellatedQuadMesh(Qt3DCore::QNode *parent)