diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-08-04 12:40:59 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-08-07 14:31:54 +0000 |
commit | 975624820bbb086f0d7957236128ddb043e792d0 (patch) | |
tree | 542c17edee5cb5238704e7aa6c083f15045a6149 /tests/auto/render/qgeometry | |
parent | 4bbe0ad81a06fb42f3aab592e5645e546bfb90db (diff) |
QAbstractAttribute: Type abstracted with an enum
Also added a dataSize property to know the number of components per vertice (1 - 4)
Change-Id: Iaa7cee2a53958ed2ec2f603f3ffc7971c027991d
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/render/qgeometry')
-rw-r--r-- | tests/auto/render/qgeometry/tst_qgeometry.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/render/qgeometry/tst_qgeometry.cpp b/tests/auto/render/qgeometry/tst_qgeometry.cpp index 187147067..3214981a8 100644 --- a/tests/auto/render/qgeometry/tst_qgeometry.cpp +++ b/tests/auto/render/qgeometry/tst_qgeometry.cpp @@ -142,16 +142,16 @@ private Q_SLOTS: QTest::newRow("defaultConstructed") << defaultConstructed << 0; Qt3D::QGeometry *geometry1 = new Qt3D::QGeometry(); - geometry1->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr1"), GL_FLOAT_VEC3, 454)); - geometry1->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr2"), GL_FLOAT_VEC4, 555)); + geometry1->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr1"), Qt3D::QAttribute::Float, 3, 454)); + geometry1->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr2"), Qt3D::QAttribute::Float, 4, 555)); QTest::newRow("2 attributes") << geometry1 << 2; Qt3D::QGeometry *geometry2 = new Qt3D::QGeometry(); - Qt3D::QAttribute *attribute = new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr2"), GL_FLOAT_VEC4, 383); - geometry2->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr1"), GL_FLOAT_VEC3, 427)); + Qt3D::QAttribute *attribute = new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr2"), Qt3D::QAttribute::Float, 4, 383); + geometry2->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr1"), Qt3D::QAttribute::Float, 3, 427)); geometry2->addAttribute(attribute); - geometry2->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr3"), GL_FLOAT_VEC2, 327)); + geometry2->addAttribute(new Qt3D::QAttribute(Q_NULLPTR, QStringLiteral("Attr3"), Qt3D::QAttribute::Float, 2, 327)); geometry2->removeAttribute(attribute); QTest::newRow("3 - 1 attributes") << geometry2 << 2; } |