diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-01-22 21:35:32 +0000 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2020-02-27 06:29:57 +0000 |
commit | 17706144e9dc6c2dfde580b7821f18c5f6924682 (patch) | |
tree | 5f77929db358607fe63a1d438b7a746a6966cbfb /tests/auto/render/scene2d/tst_scene2d.cpp | |
parent | 7f625e93620b313466d0223e911c0c3a5b492617 (diff) |
Geometry refactoring
Move QBuffer, QAttribute, QGeometry to Qt3DCore.
Change-Id: I59dfd091eefadcada93350b3aba955f40b304385
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/render/scene2d/tst_scene2d.cpp')
-rw-r--r-- | tests/auto/render/scene2d/tst_scene2d.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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); |