summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp')
-rw-r--r--tests/auto/render/trianglevisitor/tst_trianglevisitor.cpp162
1 files changed, 81 insertions, 81 deletions
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());