diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/render/attribute/tst_attribute.cpp | 8 | ||||
-rw-r--r-- | tests/auto/render/qattribute/tst_qattribute.cpp | 16 | ||||
-rw-r--r-- | tests/auto/render/trianglesextractor/tst_trianglesextractor.cpp | 28 | ||||
-rw-r--r-- | tests/manual/custom-mesh-cpp/main.cpp | 16 | ||||
-rw-r--r-- | tests/manual/tessellation-modes/tessellatedquadmesh.cpp | 4 |
5 files changed, 36 insertions, 36 deletions
diff --git a/tests/auto/render/attribute/tst_attribute.cpp b/tests/auto/render/attribute/tst_attribute.cpp index b712bd26a..88861e251 100644 --- a/tests/auto/render/attribute/tst_attribute.cpp +++ b/tests/auto/render/attribute/tst_attribute.cpp @@ -50,8 +50,8 @@ private Q_SLOTS: attribute.setCount(427); attribute.setDivisor(305); attribute.setName(QStringLiteral("C3")); - attribute.setDataType(Qt3DRender::QAttribute::UnsignedShort); - attribute.setDataSize(3); + attribute.setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort); + attribute.setVertexSize(3); Qt3DRender::QBuffer buffer(Qt3DRender::QBuffer::IndexBuffer); buffer.setUsage(Qt3DRender::QBuffer::DynamicCopy); @@ -103,8 +103,8 @@ private Q_SLOTS: attribute.setCount(427); attribute.setDivisor(305); attribute.setName(QStringLiteral("C3")); - attribute.setDataType(Qt3DRender::QAttribute::Double); - attribute.setDataSize(4); + attribute.setVertexBaseType(Qt3DRender::QAttribute::Double); + attribute.setVertexSize(4); Qt3DRender::QBuffer buffer(Qt3DRender::QBuffer::IndexBuffer); buffer.setUsage(Qt3DRender::QBuffer::DynamicCopy); buffer.setData(QByteArrayLiteral("C7")); diff --git a/tests/auto/render/qattribute/tst_qattribute.cpp b/tests/auto/render/qattribute/tst_qattribute.cpp index 18a11fe4f..2f7deaa43 100644 --- a/tests/auto/render/qattribute/tst_qattribute.cpp +++ b/tests/auto/render/qattribute/tst_qattribute.cpp @@ -64,8 +64,8 @@ private Q_SLOTS: customVertex->setByteOffset(305); customVertex->setDivisor(235); customVertex->setName("BB"); - customVertex->setDataType(Qt3DRender::QAttribute::Float); - customVertex->setDataSize(4); + customVertex->setVertexBaseType(Qt3DRender::QAttribute::Float); + customVertex->setVertexSize(4); QTest::newRow("vertex") << customVertex; Qt3DRender::QAttribute *customIndex = new Qt3DRender::QAttribute(); @@ -77,8 +77,8 @@ private Q_SLOTS: customIndex->setByteOffset(327); customIndex->setDivisor(355); customIndex->setName("SB"); - customIndex->setDataType(Qt3DRender::QAttribute::Float); - customIndex->setDataSize(3); + customIndex->setVertexBaseType(Qt3DRender::QAttribute::Float); + customIndex->setVertexSize(3); QTest::newRow("index") << customIndex; } @@ -106,8 +106,8 @@ private Q_SLOTS: QCOMPARE(attribute->byteStride(), cloneData.byteStride); QCOMPARE(attribute->byteOffset(), cloneData.byteOffset); QCOMPARE(attribute->divisor(), cloneData.divisor); - QCOMPARE(attribute->vertexBaseType(), cloneData.dataType); - QCOMPARE(attribute->vertexSize(), cloneData.dataSize); + QCOMPARE(attribute->vertexBaseType(), cloneData.vertexBaseType); + QCOMPARE(attribute->vertexSize(), cloneData.vertexSize); QVERIFY(attribute->attributeType() == cloneData.attributeType); QCOMPARE(attribute->buffer() ? attribute->buffer()->id() : Qt3DCore::QNodeId(), cloneData.bufferId); } @@ -120,7 +120,7 @@ private Q_SLOTS: arbiter.setArbiterOnNode(attribute.data()); // WHEN - attribute->setDataType(Qt3DRender::QAttribute::Double); + attribute->setVertexBaseType(Qt3DRender::QAttribute::Double); QCoreApplication::processEvents(); // THEN @@ -133,7 +133,7 @@ private Q_SLOTS: arbiter.events.clear(); // WHEN - attribute->setDataSize(4); + attribute->setVertexSize(4); QCoreApplication::processEvents(); // THEN diff --git a/tests/auto/render/trianglesextractor/tst_trianglesextractor.cpp b/tests/auto/render/trianglesextractor/tst_trianglesextractor.cpp index 8904ccd25..7647b26e7 100644 --- a/tests/auto/render/trianglesextractor/tst_trianglesextractor.cpp +++ b/tests/auto/render/trianglesextractor/tst_trianglesextractor.cpp @@ -139,8 +139,8 @@ Qt3DRender::QGeometryRenderer *customIndexedGeometryRenderer() Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute(); positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); positionAttribute->setBuffer(vertexDataBuffer); - positionAttribute->setDataType(Qt3DRender::QAttribute::Float); - positionAttribute->setDataSize(3); + positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + positionAttribute->setVertexSize(3); positionAttribute->setByteOffset(0); positionAttribute->setByteStride(9 * sizeof(float)); positionAttribute->setCount(4); @@ -149,8 +149,8 @@ Qt3DRender::QGeometryRenderer *customIndexedGeometryRenderer() Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute(); normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); normalAttribute->setBuffer(vertexDataBuffer); - normalAttribute->setDataType(Qt3DRender::QAttribute::Float); - normalAttribute->setDataSize(3); + normalAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + normalAttribute->setVertexSize(3); normalAttribute->setByteOffset(3 * sizeof(float)); normalAttribute->setByteStride(9 * sizeof(float)); normalAttribute->setCount(4); @@ -159,8 +159,8 @@ Qt3DRender::QGeometryRenderer *customIndexedGeometryRenderer() Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute(); colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); colorAttribute->setBuffer(vertexDataBuffer); - colorAttribute->setDataType(Qt3DRender::QAttribute::Float); - colorAttribute->setDataSize(3); + colorAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + colorAttribute->setVertexSize(3); colorAttribute->setByteOffset(6 * sizeof(float)); colorAttribute->setByteStride(9 * sizeof(float)); colorAttribute->setCount(4); @@ -169,8 +169,8 @@ Qt3DRender::QGeometryRenderer *customIndexedGeometryRenderer() Qt3DRender::QAttribute *indexAttribute = new Qt3DRender::QAttribute(); indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute); indexAttribute->setBuffer(indexDataBuffer); - indexAttribute->setDataType(Qt3DRender::QAttribute::UnsignedShort); - indexAttribute->setDataSize(1); + indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort); + indexAttribute->setVertexSize(1); indexAttribute->setByteOffset(0); indexAttribute->setByteStride(0); indexAttribute->setCount(12); @@ -270,8 +270,8 @@ Qt3DRender::QGeometryRenderer *customNonIndexedGeometryRenderer() Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute(); positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); positionAttribute->setBuffer(vertexDataBuffer); - positionAttribute->setDataType(Qt3DRender::QAttribute::Float); - positionAttribute->setDataSize(3); + positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + positionAttribute->setVertexSize(3); positionAttribute->setByteOffset(0); positionAttribute->setByteStride(9 * sizeof(float)); positionAttribute->setCount(12); @@ -280,8 +280,8 @@ Qt3DRender::QGeometryRenderer *customNonIndexedGeometryRenderer() Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute(); normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); normalAttribute->setBuffer(vertexDataBuffer); - normalAttribute->setDataType(Qt3DRender::QAttribute::Float); - normalAttribute->setDataSize(3); + normalAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + normalAttribute->setVertexSize(3); normalAttribute->setByteOffset(3 * sizeof(float)); normalAttribute->setByteStride(9 * sizeof(float)); normalAttribute->setCount(12); @@ -290,8 +290,8 @@ Qt3DRender::QGeometryRenderer *customNonIndexedGeometryRenderer() Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute(); colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); colorAttribute->setBuffer(vertexDataBuffer); - colorAttribute->setDataType(Qt3DRender::QAttribute::Float); - colorAttribute->setDataSize(3); + colorAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + colorAttribute->setVertexSize(3); colorAttribute->setByteOffset(6 * sizeof(float)); colorAttribute->setByteStride(9 * sizeof(float)); colorAttribute->setCount(12); diff --git a/tests/manual/custom-mesh-cpp/main.cpp b/tests/manual/custom-mesh-cpp/main.cpp index 1544f3d01..26fc236be 100644 --- a/tests/manual/custom-mesh-cpp/main.cpp +++ b/tests/manual/custom-mesh-cpp/main.cpp @@ -193,8 +193,8 @@ int main(int argc, char* argv[]) Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute(); positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); positionAttribute->setBuffer(vertexDataBuffer); - positionAttribute->setDataType(Qt3DRender::QAttribute::Float); - positionAttribute->setDataSize(3); + positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + positionAttribute->setVertexSize(3); positionAttribute->setByteOffset(0); positionAttribute->setByteStride(9 * sizeof(float)); positionAttribute->setCount(4); @@ -203,8 +203,8 @@ int main(int argc, char* argv[]) Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute(); normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); normalAttribute->setBuffer(vertexDataBuffer); - normalAttribute->setDataType(Qt3DRender::QAttribute::Float); - normalAttribute->setDataSize(3); + normalAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + normalAttribute->setVertexSize(3); normalAttribute->setByteOffset(3 * sizeof(float)); normalAttribute->setByteStride(9 * sizeof(float)); normalAttribute->setCount(4); @@ -213,8 +213,8 @@ int main(int argc, char* argv[]) Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute(); colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute); colorAttribute->setBuffer(vertexDataBuffer); - colorAttribute->setDataType(Qt3DRender::QAttribute::Float); - colorAttribute->setDataSize(3); + colorAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + colorAttribute->setVertexSize(3); colorAttribute->setByteOffset(6 * sizeof(float)); colorAttribute->setByteStride(9 * sizeof(float)); colorAttribute->setCount(4); @@ -223,8 +223,8 @@ int main(int argc, char* argv[]) Qt3DRender::QAttribute *indexAttribute = new Qt3DRender::QAttribute(); indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute); indexAttribute->setBuffer(indexDataBuffer); - indexAttribute->setDataType(Qt3DRender::QAttribute::UnsignedShort); - indexAttribute->setDataSize(1); + indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort); + indexAttribute->setVertexSize(1); indexAttribute->setByteOffset(0); indexAttribute->setByteStride(0); indexAttribute->setCount(12); diff --git a/tests/manual/tessellation-modes/tessellatedquadmesh.cpp b/tests/manual/tessellation-modes/tessellatedquadmesh.cpp index e98ee8936..5fd1aedb2 100644 --- a/tests/manual/tessellation-modes/tessellatedquadmesh.cpp +++ b/tests/manual/tessellation-modes/tessellatedquadmesh.cpp @@ -79,8 +79,8 @@ public: m_vertexBuffer->setData(positionBytes); m_positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName()); - m_positionAttribute->setDataType(Qt3DRender::QAttribute::Float); - m_positionAttribute->setDataSize(3); + m_positionAttribute->setVertexBaseType(Qt3DRender::QAttribute::Float); + m_positionAttribute->setVertexSize(3); m_positionAttribute->setCount(nVerts); m_positionAttribute->setByteStride(3 * sizeof(float)); m_positionAttribute->setBuffer(m_vertexBuffer); |